git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@50 331e1502-861f-0410-8da2-ba01fb791d7f

This commit is contained in:
legrand 2006-12-13 08:17:29 +00:00
commit f39cfb9296
3609 changed files with 0 additions and 342772 deletions

View file

@ -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

View file

@ -1,8 +0,0 @@
Pedro Angel Castillo Valdivieso
Juan Julian Merelo Guervos
Victor Manuel Rivas Santos
Gustavo Romero Lopez
Maarten Keijzer
Marc Schoenauer
Jeroen Eggermont

View file

@ -1,504 +0,0 @@
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.
<one line to give the library's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
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.
<signature of Ty Coon>, 1 April 1990
Ty Coon, President of Vice
That's all there is to it!

View file

@ -1,17 +0,0 @@
/.cvsignore/5.7/Tue Sep 21 17:01:14 2004//
/AUTHORS/5.5/Mon Nov 12 14:59:32 2001//
/COPYING/5.3/Thu Oct 6 10:06:25 2005//
/ChangeLog/5.1/Fri Feb 12 17:38:58 1999//
/ForRelease/5.2/Sat Oct 1 16:05:01 2005//
/INSTALL/5.4/Fri Sep 17 16:53:31 2004//
/LICENSE/5.1/Mon Sep 20 11:37:00 1999//
/Makefile.am/5.30/Sun Oct 2 21:42:08 2005//
/NEWS/5.5/Sun Mar 26 10:04:00 2006//
/README/5.9/Fri Sep 30 21:16:24 2005//
/README.html/5.1/Thu Aug 3 15:44:00 2000//
/THANKS/5.1/Wed Sep 22 17:30:11 2004//
/TODO.html/5.1/Thu Aug 3 15:44:00 2000//
/acinclude.m4/5.11/Thu Mar 23 18:06:10 2006//
/autogen.sh/5.14/Sun Oct 2 21:42:08 2005//
/configure.in/5.47/Sun Oct 2 21:42:08 2005//
D

View file

@ -1,11 +0,0 @@
A D/Tutorial////
A D/app////
A D/build-freebsd-x86////
A D/build-linux-x86////
A D/contrib////
A D/doc////
A D/gp////
A D/src////
A D/test////
A D/tutorial////
A D/win////

View file

@ -1 +0,0 @@
eo

View file

@ -1 +0,0 @@
:ext:evomarc@eodev.cvs.sourceforge.net:/cvsroot/eodev

View file

@ -1,17 +0,0 @@
In oder to create a new release from the current cvs sources perform
the following steps:
- Set version number in configure.in and doc/eo.cfg.
- Check/update NEWS file, set release date and version in NEWS.
- Run `make check && make dist`.
- Test distribution (unpack, configure, make check).
- Put distributions 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.
# Local Variables:
# coding: iso-8859-1
# mode: text
# fill-column: 80
# End:

View file

@ -1,229 +0,0 @@
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 `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').
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 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.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.
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
====================================
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 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
==================
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' 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.

View file

@ -1,504 +0,0 @@
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.
<one line to give the library's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
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.
<signature of Ty Coon>, 1 April 1990
Ty Coon, President of Vice
That's all there is to it!

View file

@ -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 win $(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

View file

@ -1,17 +0,0 @@
* release 0.9.4 (not yet released)
- Update introductory pages of documentation and webpage.
- Remove support for pre-standard C++ compiler (i.e. gcc-2.x), which allows to
clean up the code considerably. Assume availability of sstream and limits.
- Implement CMA-ES.
* release 0.9.3z.1 (1. Oct. 2005)
- 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:

View file

@ -1,102 +0,0 @@
EO README FILE
=======================================================================
check latest news at http://eodev.sourceforge.net/
=======================================================================
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
eodev@egroups.com, eodev-main@lists.sourceforge.net
==================================================================
BUILDING EO
==================================================================
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.
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.
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.
===================================================================
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 run
./autogen.sh
in the source-directory before building the libraries.

View file

@ -1,115 +0,0 @@
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="GENERATOR" CONTENT="Mozilla/4.05 [en] (X11; I; Linux 2.0.30 i586) [Netscape]">
<META NAME="Author" CONTENT="J.J. Merelo">
<TITLE>EO evolutionary computation framework</TITLE>
<STYLE TYPE="text/css">
<!-- /* Style Sheet definitions need to be commented to hide them from incompatible Browsers.*/
/*hotdog style name="NUEVOH2"*/
H2 {
font-family: Arial,Helvetica;
color: #FFFFCC;
background: #000077;
}
/* End Style Sheet commenting. */ -->
</STYLE>
</HEAD>
<BODY TEXT="#000077" BGCOLOR="#FFFFCC" LINK="#0000EE" VLINK="#551A8B" ALINK="#FF0000">
<CENTER>
<H1>EO Evolutionary Computation Framework and Library</H1></CENTER>
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.
<BR>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.
<h2>Installing EO and compiling examples in UNIX</h2>
To start and use it, first you can untar or unzip it (depending on the distribution you got), by doing,
<BR><TT>bash$ zcat eo-0.6.tgz | tar xvf -</TT><BR>
or
<BR><TT>bash$ unzip eo-0.6.zip</TT></P>
<P>
Once everything is decompressed to the eo-0.6 directory (or whatever), <TT>cd</TT> to it and type
<BR><TT>bash$ configure</TT><br>
or
<BR><TT>bash$ configure --prefix=/my/fav/directory</TT><br>
if you intend to use it from another directory. If you do so, you´ll have then to copy manually all the <TT>.h</TT> and <TT>.a</TT> files to it. Right now, EO is mostly templates-based, so it has mainly got header files, plus a small and independent utility library.</P>
<P> After that, type
<BR><TT>bash$ make</TT>
<BR>This makes the object and library files needed, makes the examples
in the <TT>apps/examples</TT> directory, and builds the genetic mastermind
application in the <TT>apps/master</TT> directory. If anything goes wrong at this stage, e-mail us. It should work properly with the compilers mentioned so far.
</P>
<p>Then, to unzip the documentation
<BR><TT>bash$ make docunzip</TT>
<BR>which unzips the HTML documentation into the <TT>doc</TT> directory.</p>
<P>If there is any problem, write to any of the addresses below, or
just do
<BR><TT>bash$ make bug-report</TT>
<BR>and tell us your problem, indicating EO release, the C++ compiler you
are using, and the platform.
</P>
<h2>Installing EO and compiling examples in Win95/NT</h2>
Unzip the library to your favorite directory by double-clicking on the eo-0.6 icon, and then load <tt> apps/examples/examples.dsw </tt> or <tt>
apps/examples/master.dsw </tt> 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<br>
<TT>C:\my\dir\eo-0.6\apps\examples> nmake /f examples.mak</TT><BR>
which will create debug executables for all the examples. </P>
<P> In the CygWin environment, everything should work in the same way as in UNIX, but for a couple of things. To run configure, type<br>
<tt>bash$ sh ./configure</tt>, or, much better, create a <TT>\bin</TT> directory and copy sh.exe to it; that way, shell scripts will work properly.</P>
<h2>Availability</h2>
The latest versions of EO are always available from <A HREF="http://geneura.ugr.es/~jmerelo/eo ">http://geneura.ugr.es/~jmerelo/eo</A>
and <A HREF="ftp://geneura.ugr.es/pub/eo">ftp://geneura.ugr.es/pub/eo. </A>
<H2>Working with EO</H2>
For a quick dive into the eo library, check the <A HREF="http://geneura.ugr.es/~jmerelo/eo/ASimpleGeneticAlgorithm.html">SGA</A>
<BR>Then go ahead to the <A HREF="http://geneura.ugr.es/~jmerelo/eo/DefiningGAstheeasyway.html">EasyGA,</A>
which is a more flexible implementation of a Genetic Algorithm.
<BR>Then, why not, see how EO implements Simulated Annealing in <A HREF="http://geneura.ugr.es/~jmerelo/eo/EOSimAnnAlg.html">EOSimAnnAlg</A>. If you have unzipped the documentation, there should be also <A HREF="doc/index.html">local copies</A> of these files.
<H2>Tell us something!</H2>
If you have any problem, have created a new class, or just want to
tell us something, write to <A HREF="mailto:eo@kal-el.ugr.es">eo@kal-el.ugr.es</A>.
The eo mailing list is hosted by OneList,
<a href="http://www.onelist.com/subscribe.cgi/eodev">
<img src="http://www.onelist.com/join.gif" height=36 width=72>
[Click to subscribe to eodev@onelist.com].
</a>
<HR WIDTH="100%">
<H2>Legal Stuff</H2>
EO is free and free distribution; however, if you include parts of EO in
a commercial product, you have to request authorization from us.
<BR>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.
<BR>&nbsp;
<HR WIDTH="100%">
<CENTER><Form method="POST" ACTION="http://geneura.ugr.es/cgi-bin/jj/mysearch.pl">
Search EO documentation <inPUT NAME="busca"><Input TYPE="submit" VALUE="Search">
<input type=hidden name=indexPath value="/home/jmerelo/index/eo.idx">
<input type=hidden name=origPath value="/home/jmerelo/public_html/eo">
<input type=hidden name=mappedPath value="http://geneura.ugr.es/~jmerelo/eo">
<input type=hidden name=pageTemplate value="/home/jmerelo/public_html/search_eo.html">
</Form></CENTER>
<HR WIDTH="100%">
</BODY>
</HTML>

View file

@ -1,28 +0,0 @@
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<title>TODO list for EO</title>
</head>
<body>
<h1>TODO list for EO</h1>
<ul>
<LI>Provide a way to easily manipulate the algorithm in runtime, be it
from grafically or text; expand command-line capabities?
<LI>Provide a graphical interface for Windows, in VC++ or BBuilder.
<LI>Creare more examples of the objects of which there is only one instance:
algorithms, evaluators. Try to adapt most well-know algorithms to EO
<LI>Integrate the gTK interface seamlessly in the library.
<LI>Complete documentation.
<LI>Try to implemente as algorithms the best known paradigms: Evolution Strategies, Evolutionary programming.
</ul>
<hr>
<address><a href="mailto:jmerelo@kal-el.ugr.es">Juan Julian Merelo Guervos</a></address>
<!-- Created: Wed May 13 11:06:58 CEST 1998 -->
<!-- hhmts start -->
Last modified: Wed May 13 11:12:34 CEST 1998
<!-- hhmts end -->
</body>
</html>

View file

@ -1 +0,0 @@
D

View file

@ -1 +0,0 @@
eo/Tutorial

View file

@ -1 +0,0 @@
:ext:evomarc@eodev.cvs.sourceforge.net:/cvsroot/eodev

View file

@ -1,61 +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_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
])

View file

@ -1,2 +0,0 @@
Makefile.in
Makefile

View file

@ -1,3 +0,0 @@
/.cvsignore/1.1/Thu Nov 23 19:44:47 2000//
/Makefile.am/1.8/Wed Sep 22 18:18:31 2004//
D

View file

@ -1,4 +0,0 @@
A D/gprop////
A D/gpsymreg////
A D/master////
A D/mastermind////

View file

@ -1 +0,0 @@
eo/app

View file

@ -1 +0,0 @@
:ext:evomarc@eodev.cvs.sourceforge.net:/cvsroot/eodev

View file

@ -1,3 +0,0 @@
## Makefile.am for app dir in eo
SUBDIRS = mastermind gprop gpsymreg

View file

@ -1,4 +0,0 @@
Makefile.in
Makefile
gprop
.deps

View file

@ -1,10 +0,0 @@
/.cvsignore/1.3/Mon Dec 11 09:28:40 2000//
/Makefile.am/1.4/Wed Sep 22 18:18:31 2004//
/gprop.cpp/1.3/Tue Jan 13 20:21:52 2004//
/gprop.h/1.12/Wed Sep 29 18:37:20 2004//
/l2.h/1.1/Thu Nov 23 19:14:09 2000//
/mlp.h/1.10/Sun Oct 2 21:42:08 2005//
/mse.h/1.1/Thu Nov 23 19:14:09 2000//
/qp.h/1.1/Thu Nov 23 19:14:09 2000//
/vecop.h/1.2/Sat Feb 2 05:51:31 2002//
D

View file

@ -1 +0,0 @@
eo/app/gprop

View file

@ -1 +0,0 @@
:ext:evomarc@eodev.cvs.sourceforge.net:/cvsroot/eodev

View file

@ -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)

View file

@ -1,170 +0,0 @@
//-----------------------------------------------------------------------------
// gprop
//-----------------------------------------------------------------------------
using namespace std;
#include <stdlib.h> // EXIT_SUCCESS EXIT_FAILURE
#include <stdexcept> // exception
#include <iostream> // cerr cout
#include <fstream> // ifstream
#include <string> // string
#include <eo> // all usefull eo stuff
#include "gprop.h" // Chrom eoChromInit eoChromMutation eoChromXover eoChromEvaluator
//-----------------------------------------------------------------------------
// global variables
//-----------------------------------------------------------------------------
unsigned in, out, hidden;
mlp::set train, validate, test;
//-----------------------------------------------------------------------------
// parameters
//-----------------------------------------------------------------------------
eoValueParam<unsigned> pop_size(10, "pop_size", "population size", 'p');
eoValueParam<unsigned> generations(10, "generations", "number of generation", 'g');
eoValueParam<double> mut_rate(0.25, "mut_rate", "mutation rate", 'm');
eoValueParam<double> xover_rate(0.25, "xover_rate", "default crossover rate", 'x');
eoValueParam<string> file("", "file", "common start of patterns filenames *.trn *.val and *.tst", 'f');
eoValueParam<unsigned> hiddenp(0, "hidden", "number of neurons in hidden layer", 'd');
//-----------------------------------------------------------------------------
// 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");
parser.processParam(hiddenp, "genetic operators");
if (parser.userNeedsHelp())
{
parser.printHelp(cout);
exit(EXIT_SUCCESS);
}
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();
in = train.front().input.size();
out = train.front().output.size();
gprop_use_datasets(&train, &validate, &test);
hidden = hiddenp.value();
}
//-----------------------------------------------------------------------------
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;
if (set.size() == 0)
{
cerr << filename << " data file is empty!";
exit(EXIT_FAILURE);
}
}
//-----------------------------------------------------------------------------
void ga()
{
// create population
eoInitChrom init;
eoPop<Chrom> pop(pop_size.value(), init);
// evaluate population
eoEvalFuncPtr<Chrom> evaluator(eoChromEvaluator);
apply<Chrom>(evaluator, pop);
// selector
eoStochTournamentSelect<Chrom> select;
// genetic operators
eoChromMutation mutation;
eoChromXover xover;
// stop condition
eoGenContinue<Chrom> continuator1(generations.value());
phenotype p; p.val_ok = validate.size() - 1; p.mse_error = 0;
eoFitContinue<Chrom> continuator2(p);
eoCombinedContinue<Chrom> continuator(continuator1, continuator2);
// checkpoint
eoCheckPoint<Chrom> checkpoint(continuator);
// monitor
eoStdoutMonitor monitor;
checkpoint.add(monitor);
// statistics
eoBestFitnessStat<Chrom> stats;
checkpoint.add(stats);
monitor.add(stats);
// genetic algorithm
eoSGA<Chrom> sga(select,
xover, xover_rate.value(),
mutation, mut_rate.value(),
evaluator,
checkpoint);
sga(pop);
cout << "best: " << *max_element(pop.begin(), pop.end()) << endl;
}
//-----------------------------------------------------------------------------
// Local Variables:
// mode:C++
// End:

View file

@ -1,239 +0,0 @@
// -*- 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
//-----------------------------------------------------------------------------
#include <iostream> // istream ostream
#include <iomanip> // setprecision
#include <string> // string
#include <EO.h> // EO
#include <eoOp.h> // eoMonOp eoQuadraticOp
#include <eoInit.h> // eoInit
#include <utils/rnd_generators.h> // normal_generator
#include "mlp.h" // mlp::net mlp::set
#include "qp.h" // qp::set
#include "mse.h" // mse::error
//-----------------------------------------------------------------------------
// phenotype
//-----------------------------------------------------------------------------
struct phenotype
{
int trn_ok, val_ok, tst_ok;
double mse_error;
static int trn_max, val_max, tst_max;
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;
}
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)
{
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; // complete me
}
};
int phenotype::trn_max = 0, phenotype::val_max = 0, phenotype::tst_max = 0;
//-----------------------------------------------------------------------------
// genotype
//-----------------------------------------------------------------------------
#ifndef GPROP_GENOTYPE
#define GPROP_GENOTYPE mlp::net
#endif
typedef GPROP_GENOTYPE genotype;
//-----------------------------------------------------------------------------
// Chrom
//-----------------------------------------------------------------------------
extern unsigned in, out, hidden;
class Chrom: public EO<phenotype>, public genotype
{
public:
Chrom(): genotype(in, out, vector<unsigned>(hidden < 1 ? 0 : 1, hidden)) {}
string className() const { return "Chrom"; }
void printOn (ostream& os) const
{
os << setprecision(3) << static_cast<genotype>(*this) << " \t"
<< fitness();
// os << fitness();
}
void readFrom (istream& is)
{
invalidate(); // complete me
}
};
//-----------------------------------------------------------------------------
// eoChromInit
//-----------------------------------------------------------------------------
class eoInitChrom: public eoInit<Chrom>
{
public:
void operator()(Chrom& chrom)
{
chrom.reset();
chrom.invalidate();
}
};
//-----------------------------------------------------------------------------
// global variables
//-----------------------------------------------------------------------------
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
//-----------------------------------------------------------------------------
class eoChromMutation: public eoMonOp<Chrom>
{
public:
bool operator()(Chrom& chrom)
{
mse::net tmp(chrom);
tmp.train(*trn_set, 10, 0, 0.001);
return true;
}
};
//-----------------------------------------------------------------------------
// eoChromXover
//-----------------------------------------------------------------------------
class eoChromXover: public eoQuadOp<Chrom>
{
public:
bool operator()(Chrom& chrom1, Chrom& chrom2)
{
chrom1.normalize();
chrom2.desaturate();
mse::net tmp1(chrom1), tmp2(chrom2);
ensure_datasets_initialized();
tmp1.train(*trn_set, 100, 0, 0.001);
tmp2.train(*trn_set, 100, 0, 0.001);
return true;
}
};
//-----------------------------------------------------------------------------
// eoChromEvaluator
//-----------------------------------------------------------------------------
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;
}
return sum;
}
phenotype eoChromEvaluator(const Chrom& chrom)
{
phenotype p;
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;
};
//-----------------------------------------------------------------------------
#endif // gprop_h
// Local Variables:
// mode:C++
// End:

View file

@ -1,140 +0,0 @@
//-----------------------------------------------------------------------------
// l2.h
//-----------------------------------------------------------------------------
#ifndef l2_h
#define l2_h
//-----------------------------------------------------------------------------
#include <math.h> // log
#include <qp.h> // 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:

View file

@ -1,458 +0,0 @@
//-----------------------------------------------------------------------------
// mlp.h
//-----------------------------------------------------------------------------
#ifndef mlp_h
#define mlp_h
#include <algorithm> // generate
#include <cmath> // exp
#include <iostream>
#include <iterator>
#include <numeric>
#include <stdexcept> // invalid_argument
#include <utility>
#include <vector>
#include <utils/eoRNG.h> // eoRng
#include <utils/rnd_generators.h> // normal_generator
#include <vecop.h> // *
namespace mlp
{
using namespace std;
typedef double real;
typedef std::vector<real> vector;
}
namespace std {
ostream& operator<<(ostream& os, const mlp::vector& v)
{
ostream_iterator<mlp::real> 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
{
using namespace std;
//---------------------------------------------------------------------------
// useful typedefs
//---------------------------------------------------------------------------
const real max_real = std::numeric_limits<real>::max();
const real min_real = std::numeric_limits<real>::min();
//---------------------------------------------------------------------------
// 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<real> rnd(1.0);
bias = rnd();
generate(weight.begin(), weight.end(), rnd);
}
real operator()(const vector& input) const
{
return sigmoid(bias + weight * input);
}
unsigned length() const { 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));
}
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 {
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
//---------------------------------------------------------------------------
class layer: public std::vector<neuron>
{
public:
layer(const unsigned& num_inputs = 0, const unsigned& num_neurons = 0):
std::vector<neuron>(num_neurons, neuron(num_inputs)) {}
void reset()
{
normal_generator<real> 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() const { 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();
}
void perturb(double magnitude = 0.3, double probability = 1.0)
{
for(iterator n = begin(); n != end(); ++n)
n->perturb();
}
};
}
namespace std {
ostream& operator<<(ostream& os, const mlp::layer& l)
{
ostream_iterator<mlp::neuron> 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
//---------------------------------------------------------------------------
class net: public std::vector<layer>
{
public:
net(const unsigned& num_inputs = 0,
const unsigned& num_outputs = 0,
const std::vector<unsigned>& hidden = std::vector<unsigned>())
{
init(num_inputs,num_outputs,hidden);
}
net(istream &is) {
load(is);
}
/** Virtual destructor */
virtual ~net() {};
void load(istream &is) {
unsigned num_inputs;
unsigned num_outputs;
unsigned num_hidden_layers;
is >> num_inputs >> num_outputs >> num_hidden_layers;
std::vector<unsigned> layer_sizes;
for (unsigned i=0; i<num_hidden_layers;i++) {
unsigned layer_size;
is >> 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.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,
unsigned num_outputs,
const std::vector<unsigned>& hidden ) {
clear();
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<real> rnd(1.0);
for(iterator l = begin(); l != end(); ++l)
l->reset();
}
virtual vector operator()(const vector& input) const ;
unsigned winner(const vector& input) const
{
vector tmp = (*this)(input);
return (max_element(tmp.begin(), tmp.end()) - tmp.begin());
}
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)
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;
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();
}
void perturb(double magnitude = 0.3, double probability = 1.0)
{
for(iterator l = begin(); l != end(); ++l)
l->perturb();
}
};
#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
//---------------------------------------------------------------------------
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<sample>
{
public:
set(unsigned input_size = 0, unsigned output_size = 0,
unsigned num_samples = 0):
std::vector<sample>(num_samples, sample(input_size, output_size)) {}
set(istream& is) : std::vector<sample>(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) const {
os << front().input.size() << " " << front().output.size() << endl;
copy(begin(), end(), ostream_iterator<sample>(os,"\n"));
}
};
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 <fstream>
std::ofstream file("dist.stat", ios::app);
file << sqrt(sum) << endl;
*/
return sqrt(sum);
}
//---------------------------------------------------------------------------
} // namespace mlp
#endif // mlp_h
// Local Variables:
// mode:C++
// c-file-style: "Stroustrup"
// End:

View file

@ -1,140 +0,0 @@
//-----------------------------------------------------------------------------
// mse.h
//-----------------------------------------------------------------------------
#ifndef mse_h
#define mse_h
//-----------------------------------------------------------------------------
#include <qp.h> // 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:

View file

@ -1,251 +0,0 @@
//-----------------------------------------------------------------------------
// qp.h
//-----------------------------------------------------------------------------
#ifndef qp_h
#define qp_h
//-----------------------------------------------------------------------------
#include <iostream> // istream ostream
#include <algorithm> // fill
#include <vector> // vector
#include <utils/rnd_generators.h> // uniform_generator
#include <mlp.h> // 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<neuron>
{
public:
layer(mlp::layer& l)//: std::vector<neuron>(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<layer>
{
public:
net(mlp::net& n) //: std::vector<layer>(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<real>(sqrt(me)), me_floor);
mw = max(static_cast<real>(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:

View file

@ -1,214 +0,0 @@
//-----------------------------------------------------------------------------
// vecop.h
//-----------------------------------------------------------------------------
#ifndef VECOP_H
#define VECOP_H
//-----------------------------------------------------------------------------
#include <iostream> // ostream istream
#include <vector> // vector
#include <functional> // plus minus multiplies divides
#include <numeric> // inner_product
//-----------------------------------------------------------------------------
// vector + vector
//-----------------------------------------------------------------------------
template<class T> vector<T> operator+(const vector<T>& v1, const vector<T>& v2)
{
vector<T> tmp = v1;
transform(tmp.begin(), tmp.end(), v2.begin(), tmp.begin(), plus<T>());
return tmp;
}
template<class T> vector<T> operator-(const vector<T>& v1, const vector<T>& v2)
{
vector<T> tmp = v1;
transform(tmp.begin(), tmp.end(), v2.begin(), tmp.begin(), minus<T>());
return tmp;
}
template<class T> T operator*(const vector<T>& v1, const vector<T>& v2)
{
return inner_product(v1.begin(), v1.end(), v2.begin(), static_cast<T>(0));
}
template<class T> T operator/(const vector<T>& v1, const vector<T>& v2)
{
return inner_product(v1.begin(), v1.end(), v2.begin(), static_cast<T>(0),
plus<T>(), divides<T>());
}
//-----------------------------------------------------------------------------
// vector += vector
//-----------------------------------------------------------------------------
template<class T> vector<T>& operator+=(vector<T>& v1, const vector<T>& v2)
{
transform(v1.begin(), v1.end(), v2.begin(), v1.begin(), plus<T>());
return v1;
}
template<class T> vector<T>& operator-=(vector<T>& v1, const vector<T>& v2)
{
transform(v1.begin(), v1.end(), v2.begin(), v1.begin(), minus<T>());
return v1;
}
//-----------------------------------------------------------------------------
// vector + number
//-----------------------------------------------------------------------------
template<class A, class B> vector<A> operator+(const vector<A>& a, const B& b)
{
vector<A> tmp = a;
transform(tmp.begin(), tmp.end(), tmp.begin(), bind2nd(plus<A>(), b));
return tmp;
}
template<class A, class B> vector<A> operator-(const vector<A>& a, const B& b)
{
vector<A> tmp = a;
transform(tmp.begin(), tmp.end(), tmp.begin(), bind2nd(minus<A>(), b));
return tmp;
}
template<class A, class B> vector<A> operator*(const vector<A>& a, const B& b)
{
vector<A> tmp = a;
transform(tmp.begin(), tmp.end(), tmp.begin(), bind2nd(multiplies<A>(), b));
return tmp;
}
template<class A, class B> vector<A> operator/(const vector<A>& a, const B& b)
{
vector<A> tmp = a;
transform(tmp.begin(), tmp.end(), tmp.begin(), bind2nd(divides<A>(), b));
return tmp;
}
//-----------------------------------------------------------------------------
// number + vector
//-----------------------------------------------------------------------------
template<class A, class B> vector<A> operator+(const B& b, const vector<A>& a)
{
vector<A> tmp = a;
transform(tmp.begin(), tmp.end(), tmp.begin(), bind2nd(plus<A>(), b));
return tmp;
}
template<class A, class B> vector<A> operator-(const B& b, const vector<A>& a)
{
vector<A> tmp(a.size(), b);
transform(tmp.begin(), tmp.end(), a.begin(), tmp.begin(), minus<A>());
return tmp;
}
template<class A, class B> vector<A> operator*(const B& b, const vector<A>& a)
{
vector<A> tmp = a;
transform(tmp.begin(), tmp.end(), tmp.begin(), bind2nd(multiplies<A>(), b));
return tmp;
}
template<class A, class B> vector<A> operator/(const B& b, const vector<A>& a)
{
vector<A> tmp(a.size(), b);
transform(tmp.begin(), tmp.end(), a.begin(), tmp.begin(), divides<A>());
return tmp;
}
//-----------------------------------------------------------------------------
// vector += number
//-----------------------------------------------------------------------------
template<class A, class B> vector<A>& operator+=(vector<A>& a, const B& b)
{
transform(a.begin(), a.end(), a.begin(), bind2nd(plus<A>(), b));
return a;
}
template<class A, class B> vector<A>& operator-=(vector<A>& a, const B& b)
{
transform(a.begin(), a.end(), a.begin(), bind2nd(minus<A>(), b));
return a;
}
template<class A, class B> vector<A>& operator*=(vector<A>& a, const B& b)
{
transform(a.begin(), a.end(), a.begin(), bind2nd(multiplies<A>(), b));
return a;
}
template<class A, class B> vector<A>& operator/=(vector<A>& a, const B& b)
{
transform(a.begin(), a.end(), a.begin(), bind2nd(divides<A>(), b));
return a;
}
//-----------------------------------------------------------------------------
// I/O
//-----------------------------------------------------------------------------
template<class T> ostream& operator<<(ostream& os, const vector<T>& v)
{
os << '<';
if (v.size())
{
copy(v.begin(), v.end() - 1, ostream_iterator<T>(os, " "));
os << v.back();
}
return os << '>';
}
template<class T> istream& operator>>(istream& is, vector<T>& 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<class T> T euclidean_distance(const vector<T>& v1,
const vector<T>& 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

View file

@ -1 +0,0 @@
Makefile.in

View file

@ -1,7 +0,0 @@
/.cvsignore/1.1/Fri Sep 17 17:00:04 2004//
/Makefile.am/1.7/Sun Oct 2 21:42:08 2005//
/fitness.h/1.7/Mon Mar 27 18:55:19 2006//
/main.cpp/1.6/Wed Oct 5 21:34:19 2005//
/node.h/1.6/Mon Feb 4 14:28:00 2002//
/parameters.h/1.1/Thu Jun 28 14:39:36 2001//
D

View file

@ -1 +0,0 @@
eo/app/gpsymreg

View file

@ -1 +0,0 @@
:ext:evomarc@eodev.cvs.sourceforge.net:/cvsroot/eodev

View file

@ -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)

View file

@ -1,228 +0,0 @@
/*
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 <gp/eoParseTree.h>
#include <eo>
#include <cmath>
#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<MinimizingFitnessTraits> 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;
}
// the function for a protected divide looks a little bit different
double _divides(double arg1, double arg2)
{
if (arg2 ==0)
return 0;
else
return arg1 / arg2;
}
double _negate(double arg1)
{
return -arg1;
}
// now let's define our tree nodes
void init(vector<Node> &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 a protected divide function.
Operation OpDIVIDE( _divides, 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);
// and some unary functions
Operation NEGATE( _negate,string("-"));
Operation SIN ( sin, string("sin"));
Operation COS ( cos, string("cos"));
// Now we are ready to add the possible nodes to our initSequence (which is used by the eoDepthInitializer)
// 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 );
// and the binary functions
initSequence.push_back( PLUS);
initSequence.push_back( MINUS );
initSequence.push_back( MULTIPLIES );
initSequence.push_back( DIVIDE );
// and the binary operators
initSequence.push_back( OpPLUS);
initSequence.push_back( OpMINUS );
initSequence.push_back( OpMULTIPLIES );
initSequence.push_back( OpDIVIDE );
};
class RegFitness: public eoEvalFunc< eoParseTree<FitnessType, Node> >
{
public:
typedef eoParseTree<FitnessType, Node> EoType;
void operator()(EoType &_eo)
{
vector< double > input(1); // the input variable(s)
double output(0.);
double target;
FitnessType 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);
}
fitness[NORMAL] = fit;
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<unsigned> &_generationCounter, vector< Node > &initSequence, Parameters &_parameter) : eoEvalFunc<EoType>(), generationCounter(_generationCounter), parameter(_parameter)
{
init(initSequence);
best[NORMAL] = 1000;
tree= "not found";
};
~RegFitness()
{
cerr << "Best Fitness= " << best[NORMAL] << endl;
cerr << tree << endl;
};
private:
eoValueParam<unsigned> &generationCounter; // so we know the current generation
Parameters &parameter; // the parameters
FitnessType best; // the best found fitness
string tree;
};
#endif

View file

@ -1,172 +0,0 @@
/*
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
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <iostream>
#include "gp/eoParseTree.h"
#include "eo"
using namespace gp_parse_tree;
using namespace std;
//-----------------------------------------------------------------------------
#include "node.h"
#include "parameters.h"
#include "fitness.h"
// TYPE DECLARATIONS FOR GP
typedef eoParseTree<FitnessType, Node > EoType;
typedef eoPop<EoType> Pop;
//-----------------------------------------------------------------------------
int main(int argc, char *argv[])
{
// the vector containing the possible nodes
vector<Node> initSequence;
// initialise parameters
Parameters parameter(argc, argv);
// set the randomseed
rng.reseed(parameter.randomseed);
// Create a generation counter
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());
// 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, set for Ramped Half and Half Initialization
eoParseTreeDepthInit<FitnessType, Node> initializer(parameter.InitMaxDepth, initSequence, true, true);
// create the initial population
Pop pop(parameter.population_size, initializer);
// and evaluate the individuals
apply<EoType>(eval, pop);
generationCounter.value()++; // set the generationCounter to 1
// define X-OVER
eoSubtreeXOver<FitnessType, Node> xover(parameter.MaxSize);
// define MUTATION
eoBranchMutation<FitnessType, Node> mutation(initializer, parameter.MaxSize);
// eoExpansionMutation<FitnessType, Node> mutation(initializer, parameter.MaxSize);
// eoCollapseSubtreeMutation<FitnessType, Node> mutation(initializer, parameter.MaxSize);
// eoPointMutation<FitnessType, Node> mutation(initSequence);
// eoHoistMutation<FitnessType, Node> mutation;
// The operators are encapsulated into an eoTRansform object,
// that performs sequentially crossover and mutation
eoSGATransform<EoType> transform(xover, parameter.xover_rate, mutation, parameter.mutation_rate);
// The robust tournament selection
// in our case 5-tournament selection
eoDetTournamentSelect<EoType> selectOne(parameter.tournamentsize);
// is now encapsulated in a eoSelectMany
eoSelectMany<EoType> select(selectOne, parameter.offspring_size, eo_is_an_integer);
// and the generational replacement
//eoGenerationalReplacement<EoType> replace;
// or the SteadtState replacment
//eoSSGAWorseReplacement<EoType> replace;
// or comma selection
eoCommaReplacement<EoType> replace;
// Terminators
eoGenContinue<EoType> term(parameter.nGenerations);
eoCheckPoint<EoType> checkPoint(term);
// STATISTICS
eoAverageStat<EoType> avg;
eoBestFitnessStat<EoType> best;
// Add it to the checkpoint,
// so the counter is updated (here, incremented) every generation
checkPoint.add(increment);
checkPoint.add(avg);
checkPoint.add(best);
#ifdef HAVE_GNUPLOT
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<string> 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<string> dummy2("", "Average Tree Size");
gnuplotAvgmonitor.add(dummy2);
checkPoint.add(gnuplotmonitor);
checkPoint.add(gnuplotAvgmonitor);
#endif
// GP Generation
eoEasyEA<EoType> 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;
};

View file

@ -1,248 +0,0 @@
/*
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 <iostream>
#include <string>
#include <cmath> // 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;
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;
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<class Children>
void operator()(double& result, Children args, vector<double> &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;
}
}
template<class Children>
void 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

View file

@ -1,112 +0,0 @@
/*
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 <gp/eoParseTree.h>
#include <eo>
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<unsigned int> paramGenerations(1, "generations", "Generations", 'G', false);
parser.processParam( paramGenerations );
nGenerations = paramGenerations.value();
cerr << "nGenerations= " << nGenerations << endl;
// populationsize
eoValueParam<unsigned int> paramPopulationSize(10, "populationsize", "PopulationSize", 'P', false);
parser.processParam( paramPopulationSize );
population_size = paramPopulationSize.value();
cerr << "population_size= " << population_size << endl;
// offspringsize
eoValueParam<unsigned int> paramOffspringSize(population_size, "offspringsize", "OffspringSize", 'O', false);
parser.processParam( paramOffspringSize );
offspring_size = paramOffspringSize.value();
cerr << "offspring_size= " << offspring_size << endl;
// maxsize
eoValueParam<unsigned int> paramMaxSize(15, "maxsize", "MaxSize", 'S', false);
parser.processParam( paramMaxSize );
MaxSize = paramMaxSize.value();
cerr << "MaxSize= " << MaxSize << endl;
// initialmaxdepth
eoValueParam<unsigned int> paramInitialMaxDepth(4, "initialmaxdepth", "InitialMaxDepth", 'D', false);
parser.processParam( paramInitialMaxDepth );
InitMaxDepth = paramInitialMaxDepth.value();
cerr << "InitMaxDepth= " << InitMaxDepth << endl;
// randomseed
eoValueParam<unsigned int> paramRandomSeed(1, "randomseed", "Random Seed", 'R', false);
parser.processParam( paramRandomSeed );
randomseed = paramRandomSeed.value();
cerr << "randomseed= " << randomseed << endl;
// crossover-rate
eoValueParam<double> paramXover(0.75, "crossoverrate", "crossover rate", 'x', false);
parser.processParam(paramXover );
xover_rate = paramXover.value();
cerr << "xover_rate= " << xover_rate << endl;
//mutation-rate
eoValueParam<double> paramMutation(0.25, "mutationrate", "mutation rate", 'm', false);
parser.processParam(paramMutation );
mutation_rate = paramMutation.value();
cerr << "mutation_rate= " << mutation_rate << endl;
//tournament size
eoValueParam<unsigned int > 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

View file

@ -1 +0,0 @@
D

View file

@ -1 +0,0 @@
eo/app/master

View file

@ -1 +0,0 @@
:ext:evomarc@eodev.cvs.sourceforge.net:/cvsroot/eodev

View file

@ -1,4 +0,0 @@
Makefile.in
Makefile
mastermind
.deps

View file

@ -1,5 +0,0 @@
/.cvsignore/1.1/Mon Dec 11 09:28:40 2000//
/Makefile.am/1.6/Sun Oct 2 21:42:08 2005//
/mastermind.cpp/1.5/Thu Dec 23 15:29:07 2004//
/mastermind.h/1.9/Sun Oct 2 21:42:08 2005//
D

View file

@ -1 +0,0 @@
eo/app/mastermind

View file

@ -1 +0,0 @@
:ext:evomarc@eodev.cvs.sourceforge.net:/cvsroot/eodev

View file

@ -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)

View file

@ -1,138 +0,0 @@
//-----------------------------------------------------------------------------
// mastermind
//-----------------------------------------------------------------------------
#include <stdlib.h> // EXIT_SUCCESS EXIT_FAILURE
#include <stdexcept> // exception
#include <iostream> // cerr cout
#include <fstream> // ifstream
#include <string> // string
#include <eo> // all usefull eo stuff
#include "mastermind.h" // Chrom eoChromInit eoChromMutation eoChromXover eoChromEvaluator
using namespace std;
//-----------------------------------------------------------------------------
// global variables
//-----------------------------------------------------------------------------
unsigned in, out, hidden;
//-----------------------------------------------------------------------------
// parameters
//-----------------------------------------------------------------------------
eoValueParam<unsigned> pop_size(16, "pop_size", "population size", 'p');
eoValueParam<unsigned> generations(100, "generations", "number of generation", 'g');
eoValueParam<double> mut_rate(0.1, "mut_rate", "mutation rate", 'm');
eoValueParam<double> xover_rate(0.5, "xover_rate", "default crossover rate", 'x');
eoValueParam<unsigned> col_p(default_colors, "colors", "number of colors", 'c');
eoValueParam<unsigned> len_p(default_length, "legth", "solution legth", 'l');
eoValueParam<string> sol_p(default_solution, "solution", "problem solution", 's');
//-----------------------------------------------------------------------------
// auxiliar functions
//-----------------------------------------------------------------------------
void arg(int argc, char** argv);
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(col_p, "problem");
parser.processParam(len_p, "problem");
parser.processParam(sol_p, "problem");
if (parser.userNeedsHelp())
{
parser.printHelp(cout);
exit(EXIT_SUCCESS);
}
init_eoChromEvaluator(col_p.value(), len_p.value(), sol_p.value());
}
//-----------------------------------------------------------------------------
void ga()
{
// create population
eoInitChrom init;
eoPop<Chrom> pop(pop_size.value(), init);
// evaluate population
eoEvalFuncPtr<Chrom> evaluator(eoChromEvaluator);
apply<Chrom>(evaluator, pop);
// selector
eoProportionalSelect<Chrom> select(pop);
// genetic operators
eoChromMutation mutation;
eoChromXover xover;
// stop condition
eoGenContinue<Chrom> continuator1(generations.value());
eoFitContinue<Chrom> continuator2(solution.fitness());
eoCombinedContinue<Chrom> continuator(continuator1, continuator2);
// checkpoint
eoCheckPoint<Chrom> checkpoint(continuator);
// monitor
eoStdoutMonitor monitor;
checkpoint.add(monitor);
// statistics
eoBestFitnessStat<Chrom> stats;
checkpoint.add(stats);
monitor.add(stats);
// genetic algorithm
eoSGA<Chrom> sga(select,
xover, xover_rate.value(),
mutation, mut_rate.value(),
evaluator,
checkpoint);
sga(pop);
cout << "solution = " << solution << endl
<< "best = " << *max_element(pop.begin(), pop.end()) << endl;
}
//-----------------------------------------------------------------------------
// Local Variables:
// mode:C++
// End:

View file

@ -1,199 +0,0 @@
//-----------------------------------------------------------------------------
// mastermind.h
//-----------------------------------------------------------------------------
#ifndef mastermind_h
#define mastermind_h
//-----------------------------------------------------------------------------
#include <stdlib.h> // exit EXIT_FAILURE
#include <eoVector.h> // eoVectorLength
#include <eoOp.h> // eoMonOp eoQuadraticOp
#include <eoInit.h> // eoInit
#include "utils/rnd_generators.h" // uniform_generator
//-----------------------------------------------------------------------------
// phenotype
//-----------------------------------------------------------------------------
typedef float phenotype;
//-----------------------------------------------------------------------------
// genotype
//-----------------------------------------------------------------------------
typedef std::vector<int> genotype;
//-----------------------------------------------------------------------------
// Chrom
//-----------------------------------------------------------------------------
typedef eoVector<phenotype, int> Chrom;
//-----------------------------------------------------------------------------
// eoChromEvaluator
//-----------------------------------------------------------------------------
// const unsigned points_per_black = 3, points_per_white = 1;
Chrom solution;
phenotype eoChromEvaluator(const Chrom& chrom)
{
Chrom tmp = solution;
unsigned black = 0, white = 0;
// look for blacks
for (unsigned i = 0; i < chrom.size(); ++i)
if (chrom[i] == tmp[i])
{
++black;
tmp[i] = -1;
}
// look for whites
for (unsigned i = 0; i < chrom.size(); ++i)
for (unsigned j = 0; j < tmp.size(); ++j)
if (chrom[i] == tmp[j])
{
++white;
tmp[j] = -1;
break;
}
// return black * points_per_black + white * points_per_white;
return black * chrom.size() + white;
};
const unsigned default_length = 8;
const unsigned default_colors = 8;
const std::string default_solution = "01234567";
unsigned num_colors;
void init_eoChromEvaluator(const unsigned& c, const unsigned& l, std::string s)
{
num_colors = c;
// check consistency between parameters
if (s != default_solution)
{
// check length
if (l != default_length && s.size() != l)
{
std::cerr << "solution length != length" << std::endl;
exit(EXIT_FAILURE);
}
// check number of colors
if ((c != default_colors) && (c < unsigned(*max_element(s.begin(), s.end()) - '0')))
{
std::cerr << "too high color number found!" << std::endl;
exit(EXIT_FAILURE);
}
}
else
if (l != default_length || c != default_colors )
// generate a random solution
if(num_colors <= 10)
{
uniform_generator<char> color('0', static_cast<char>('0' + c));
s.resize(l);
generate(s.begin(), s.end(), color);
}
// put the solution parameter on the solution chromosome
if (num_colors <= 10)
{
solution.resize(s.size());
for (unsigned i = 0; i < solution.size(); ++i)
solution[i] = s[i] - '0';
}
else
{
solution.resize(l);
uniform_generator<int> color(0, num_colors);
generate(solution.begin(), solution.end(), color);
}
solution.fitness(eoChromEvaluator(solution));
}
//-----------------------------------------------------------------------------
// eoChromInit
//-----------------------------------------------------------------------------
class eoInitChrom: public eoInit<Chrom>
{
public:
void operator()(Chrom& chrom)
{
uniform_generator<int> color(0, num_colors);
chrom.resize(solution.size());
generate(chrom.begin(), chrom.end(), color);
chrom.invalidate();
}
};
//-----------------------------------------------------------------------------
// eoChromMutation
//-----------------------------------------------------------------------------
class eoChromMutation: public eoMonOp<Chrom>
{
// many operators in one :(
bool operator()(Chrom& chrom)
{
uniform_generator<unsigned> what(0, 2);
uniform_generator<unsigned> position(0, chrom.size());
switch(what())
{
case 0:
{
// mutation
uniform_generator<int> color(0, num_colors);
chrom[position()] = color();
break;
}
case 1:
{
// transposition
std::swap(chrom[position()], chrom[position()]);
break;
}
default:
{
std::cerr << "unknown operator!" << std::endl;
exit(EXIT_FAILURE);
break;
}
}
return true;
}
};
//-----------------------------------------------------------------------------
// eoChromXover
//-----------------------------------------------------------------------------
class eoChromXover: public eoQuadOp<Chrom>
{
public:
bool operator()(Chrom& chrom1, Chrom& chrom2)
{
uniform_generator<unsigned> position(0, chrom1.size());
swap_ranges(chrom1.begin(), chrom1.begin() + position(), chrom2.begin());
return true;
}
};
//-----------------------------------------------------------------------------
#endif // mastermind_h
// Local Variables:
// mode:C++
// End:

View file

@ -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

View file

@ -1 +0,0 @@
eo/build-freebsd-x86

View file

@ -1 +0,0 @@
:ext:evomarc@eodev.cvs.sourceforge.net:/cvsroot/eodev

View file

@ -1 +0,0 @@
eo/build-linux-x86

View file

@ -1 +0,0 @@
:ext:evomarc@eodev.cvs.sourceforge.net:/cvsroot/eodev

View file

@ -1,74 +0,0 @@
dnl Process this file with autoconf to produce a configure script.
dnl
dnl Change the version number here
AC_INIT([Evolving Objects], [0.9.4-cvs], [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
AC_CHECK_HEADERS(limits, [], AC_MSG_ERROR([Need limits C++ include.]))
AC_CHECK_HEADERS(sstream, [], AC_MSG_ERROR([Need sstream C++ include.]))
AC_CHECK_HEADERS(stdint.h, [], AC_MSG_WARN([Need C99 standard header.]))
dnl Checks for typedefs, structures, and compiler characteristics.
AC_CHECK_SIZEOF(unsigned long)
AC_CHECK_TYPES(uint32_t, [], AC_MSG_WARN([Need uint32_t from C99 standard.]))
AC_TYPE_SIZE_T
dnl Checks for libraries.
dnl Checks for library functions.
AC_CHECK_LIB(m, cos)
dnl user-switches
AC_APPLICATIONS
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 \
test/Makefile \
tutorial/Makefile \
tutorial/Lesson1/Makefile \
tutorial/Lesson2/Makefile \
tutorial/Lesson3/Makefile \
tutorial/Lesson4/Makefile \
tutorial/Lesson5/Makefile \
win/Makefile)

View file

@ -1,2 +0,0 @@
Makefile.in
Makefile

View file

@ -1,5 +0,0 @@
/.cvsignore/1.2/Thu Nov 23 19:15:31 2000//
/Makefile.am/1.4/Tue Sep 21 10:23:32 2004//
/eoAged.h/1.2/Thu Feb 27 19:26:54 2003//
/eoDrawable.h/1.1/Wed Mar 22 14:48:49 2000//
D

View file

@ -1,3 +0,0 @@
A D/MGE////
A D/boost////
A D/mathsym////

View file

@ -1 +0,0 @@
eo/contrib

View file

@ -1 +0,0 @@
:ext:evomarc@eodev.cvs.sourceforge.net:/cvsroot/eodev

View file

@ -1,4 +0,0 @@
/VirusOp.h/1.3/Thu Feb 27 19:26:43 2003//
/eoInitVirus.h/1.1/Thu May 17 10:08:25 2001//
/eoVirus.h/1.4/Thu Oct 6 17:22:40 2005//
D

View file

@ -1 +0,0 @@
eo/contrib/MGE

View file

@ -1 +0,0 @@
:ext:evomarc@eodev.cvs.sourceforge.net:/cvsroot/eodev

View file

@ -1,144 +0,0 @@
/*
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: 2003/02/27 19:26:43 $ $Header: /cvsroot/eodev/eo/contrib/MGE/VirusOp.h,v 1.3 2003/02/27 19:26:43 okoenig Exp $ $Author: okoenig $
*/
#ifndef VirusOp_h
#define VirusOp_h
//-----------------------------------------------------------------------------
#include <iostream> // ostream, istream
#include <functional> // bind2nd
#include <string> // std::string
#include <utils/eoRNG.h>
#include "../contrib/MGE/eoVirus.h"
/** VirusBitFlip --> changes 1 bit
*/
template<class FitT>
class VirusBitFlip: public eoMonOp<eoVirus<FitT> > {
public:
/// The class name.
virtual std::string className() const { return "VirusBitFlip"; };
/**
* Change one bit.
* @param chrom The cromosome which one bit is going to be changed.
*/
bool operator()(eoVirus<FitT>& _chrom) {
unsigned i = eo::rng.random(_chrom.size());
_chrom.virusBitSet(i, _chrom.virusBit(i) ? false : true );
return true;
}
};
template<class FitT>
class VirusMutation: public eoMonOp<eoVirus<FitT> > {
public:
/// The class name.
virtual std::string className() const { return "VirusMutation"; };
/**
* Change one bit.
* @param chrom The cromosome which one bit is going to be changed.
*/
bool operator()(eoVirus<FitT>& _chrom) {
// Search for virus bits
std::vector<unsigned> 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;
}
};
/// Works for 1-bit virus; shifts the one to the right or left
template<class FitT>
class VirusShiftMutation: public eoMonOp<eoVirus<FitT> > {
public:
/// Ctor
VirusShiftMutation( ) {};
/// The class name.
virtual std::string className() const { return "VirusShiftMutation"; };
/**
* Change one bit.
* @param chrom The cromosome which one bit is going to be changed.
*/
bool operator()(eoVirus<FitT>& _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 FitT>
class VirusTransmission: public eoBinOp<eoVirus<FitT> > {
public:
/// The class name.
virtual std::string className() const { return "VirusTransmission"; };
/**
* Change one bit.
* @param _chrom The "receptor" chromosome
* @param _chrom2 The "donor" chromosome
*/
bool operator()(eoVirus<FitT>& _chrom,const eoVirus<FitT>& _chrom2) {
// Search for virus bits
for ( unsigned i = 0; i < _chrom.size(); i ++ ) {
_chrom.virusBitSet(i, _chrom2.virusBit(i) );
}
return true;
}
};
#endif //VirusOp_h

View file

@ -1,86 +0,0 @@
// -*- 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 <algorithm>
#include <eoOp.h>
#include <eoSTLFunctor.h>
#include <utils/eoRndGenerators.h>
#include <eoInit.h>
/**
Initializer for binary chromosome with MGE
*/
template <class FitT>
class eoInitVirus: public eoInit< eoVirus<FitT> > {
public:
eoInitVirus(unsigned _combien, eoRndGenerator<bool>& _generator )
: combien(_combien), generator(_generator) {}
virtual void operator()( eoVirus<FitT>& 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<bool> generator;
};
/// Inits the virus with one bit to the left set to one
template <class FitT>
class eoInitVirus1bit: public eoInit< eoVirus<FitT> > {
public:
eoInitVirus1bit(unsigned _combien, eoRndGenerator<bool>& _generator )
: combien(_combien), generator(_generator) {}
virtual void operator()( eoVirus<FitT>& 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<bool> generator;
};
#endif

View file

@ -1,130 +0,0 @@
/* 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
*/
#ifndef eoVirus_h
#define eoVirus_h
#include <iostream>
#include <functional>
#include <string>
#include <vector>
#include "ga/eoBit.h"
/**
\defgroup bitstring
Various functions for a bitstring representation
*/
/** Implementation of bitstring chromosome.
@class eoBit eoBit.h ga/eoBit.h
@ingroup bitstring
Based on STL's vector<bool> specialization.
*/
template <class FitT>
class eoVirus : public eoBit<FitT>
{
public:
using eoBit<FitT>::begin;
using eoBit<FitT>::end;
using eoBit<FitT>::size;
/** (Default) Constructor
@param size Size of the binary std::string.
*/
eoVirus(unsigned _size = 0, bool _value = false, bool _virValue = false):
eoBit<FitT>(_size, _value), virus( _size, _virValue) {}
/// My class name
virtual std::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(std::ostream& os) const {
EO<FitT>::printOn(os);
os << ' ';
os << size() << ' ';
std::copy(begin(), end(), std::ostream_iterator<bool>(os));
std::cout << std::endl;
std::copy(virus.begin(), virus.end(), std::ostream_iterator<bool>(os));
}
/** To read me from a stream.
@param is The istream.
*/
virtual void readFrom(std::istream& is){
eoBit<FitT>::readFrom(is);
unsigned s;
is >> s;
std::string bits;
is >> bits;
if (is) {
virus.resize(bits.size());
std::transform(bits.begin(), bits.end(), virus.begin(),
std::bind2nd(std::equal_to<char>(), '1'));
}
}
private:
std::vector<bool> virus;
};
//-----------------------------------------------------------------------------
#endif //eoBit_h
// Local Variables:
// coding: iso-8859-1
// mode: C++
// c-file-style: "Stroustrup"
// End:

View file

@ -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

View file

@ -1,3 +0,0 @@
/config.hpp/1.1/Thu Oct 6 12:13:52 2005//
/limits.hpp/1.1/Thu Oct 6 12:13:52 2005//
D

View file

@ -1,2 +0,0 @@
A D/config////
A D/numeric////

View file

@ -1 +0,0 @@
eo/contrib/boost

View file

@ -1 +0,0 @@
:ext:evomarc@eodev.cvs.sourceforge.net:/cvsroot/eodev

View file

@ -1,70 +0,0 @@
// 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
// 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.
// Boost config.hpp policy and rationale documentation has been moved to
// http://www.boost.org/libs/config
//
// CAUTION: This file is intended to be completely stable -
// DO NOT MODIFY THIS FILE!
//
#ifndef BOOST_CONFIG_HPP
#define BOOST_CONFIG_HPP
// if we don't have a user config, then use the default location:
#if !defined(BOOST_USER_CONFIG) && !defined(BOOST_NO_USER_CONFIG)
# define BOOST_USER_CONFIG <boost/config/user.hpp>
#endif
// include it first:
#ifdef BOOST_USER_CONFIG
# include BOOST_USER_CONFIG
#endif
// if we don't have a compiler config set, try and find one:
#if !defined(BOOST_COMPILER_CONFIG) && !defined(BOOST_NO_COMPILER_CONFIG) && !defined(BOOST_NO_CONFIG)
# include <boost/config/select_compiler_config.hpp>
#endif
// if we have a compiler config, include it now:
#ifdef BOOST_COMPILER_CONFIG
# include BOOST_COMPILER_CONFIG
#endif
// if we don't have a std library config set, try and find one:
#if !defined(BOOST_STDLIB_CONFIG) && !defined(BOOST_NO_STDLIB_CONFIG) && !defined(BOOST_NO_CONFIG)
# include <boost/config/select_stdlib_config.hpp>
#endif
// if we have a std library config, include it now:
#ifdef BOOST_STDLIB_CONFIG
# include BOOST_STDLIB_CONFIG
#endif
// if we don't have a platform config set, try and find one:
#if !defined(BOOST_PLATFORM_CONFIG) && !defined(BOOST_NO_PLATFORM_CONFIG) && !defined(BOOST_NO_CONFIG)
# include <boost/config/select_platform_config.hpp>
#endif
// if we have a platform config, include it now:
#ifdef BOOST_PLATFORM_CONFIG
# include BOOST_PLATFORM_CONFIG
#endif
// get config suffix code:
#include <boost/config/suffix.hpp>
#endif // BOOST_CONFIG_HPP

View file

@ -1,11 +0,0 @@
/abi_prefix.hpp/1.1/Thu Oct 6 12:13:52 2005//
/abi_suffix.hpp/1.1/Thu Oct 6 12:13:52 2005//
/auto_link.hpp/1.1/Thu Oct 6 12:13:52 2005//
/posix_features.hpp/1.1/Thu Oct 6 12:13:52 2005//
/requires_threads.hpp/1.1/Thu Oct 6 12:13:52 2005//
/select_compiler_config.hpp/1.1/Thu Oct 6 12:13:52 2005//
/select_platform_config.hpp/1.1/Thu Oct 6 12:13:52 2005//
/select_stdlib_config.hpp/1.1/Thu Oct 6 12:13:52 2005//
/suffix.hpp/1.1/Thu Oct 6 12:13:52 2005//
/user.hpp/1.1/Thu Oct 6 12:13:52 2005//
D

View file

@ -1,4 +0,0 @@
A D/abi////
A D/compiler////
A D/platform////
A D/stdlib////

View file

@ -1 +0,0 @@
eo/contrib/boost/config

View file

@ -1 +0,0 @@
:ext:evomarc@eodev.cvs.sourceforge.net:/cvsroot/eodev

View file

@ -1 +0,0 @@
eo/contrib/boost/config/abi

View file

@ -1 +0,0 @@
:ext:evomarc@eodev.cvs.sourceforge.net:/cvsroot/eodev

View file

@ -1,20 +0,0 @@
// 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).
#ifndef BOOST_CONFIG_ABI_PREFIX_HPP
# define BOOST_CONFIG_ABI_PREFIX_HPP
#else
# error double inclusion of header boost/config/abi_prefix.hpp is an error
#endif
#include <boost/config.hpp>
// this must occur after all other includes and before any code appears:
#ifdef BOOST_HAS_ABI_HEADERS
# include BOOST_ABI_PREFIX
#endif

View file

@ -1,23 +0,0 @@
// 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).
// This header should be #included AFTER code that was preceded by a #include
// <boost/config/abi_prefix.hpp>.
#ifndef BOOST_CONFIG_ABI_PREFIX_HPP
# error Header boost/config/abi_prefix.hpp must only be used after boost/config/abi_prefix.hpp
#else
# undef BOOST_CONFIG_ABI_PREFIX_HPP
#endif
// the suffix header occurs after all of our code:
#ifdef BOOST_HAS_ABI_HEADERS
# include BOOST_ABI_SUFFIX
#endif

View file

@ -1,354 +0,0 @@
// (C) 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)
/*
* LOCATION: see http://www.boost.org for most recent version.
* FILE auto_link.hpp
* VERSION see <boost/version.hpp>
* DESCRIPTION: Automatic library inclusion for Borland/Microsoft compilers.
*/
/*************************************************************************
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.
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).
BOOST_AUTO_LINK_NOMANGLE: Specifies that we should link to BOOST_LIB_NAME.lib,
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!
Algorithm:
~~~~~~~~~~
Libraries for Borland and Microsoft compilers are automatically
selected here, the name of the lib is selected according to the following
formula:
BOOST_LIB_PREFIX
+ BOOST_LIB_NAME
+ "_"
+ BOOST_LIB_TOOLSET
+ BOOST_LIB_THREAD_OPT
+ BOOST_LIB_RT_OPT
"-"
+ BOOST_LIB_VERSION
These are defined as:
BOOST_LIB_PREFIX: "lib" for static libraries otherwise "".
BOOST_LIB_NAME: The base name of the lib ( for example boost_regex).
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:
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.
***************************************************************************/
#ifdef __cplusplus
# ifndef BOOST_CONFIG_HPP
# include <boost/config.hpp>
# endif
#elif defined(_MSC_VER) && !defined(__MWERKS__) && !defined(__EDG_VERSION__)
//
// C language compatability (no, honestly)
//
# define BOOST_MSVC _MSC_VER
# define BOOST_STRINGIZE(X) BOOST_DO_STRINGIZE(X)
# define BOOST_DO_STRINGIZE(X) #X
#endif
//
// Only include what follows for known and supported compilers:
//
#if defined(BOOST_MSVC) \
|| defined(__BORLANDC__) \
|| (defined(__MWERKS__) && defined(_WIN32) && (__MWERKS__ >= 0x3000)) \
|| (defined(__ICL) && defined(_MSC_EXTENSIONS) && (_MSC_VER >= 1200))
#ifndef BOOST_VERSION_HPP
# include <boost/version.hpp>
#endif
#ifndef BOOST_LIB_NAME
# error "Macro BOOST_LIB_NAME not set (internal error)"
#endif
//
// error check:
//
#if defined(__MSVC_RUNTIME_CHECKS) && !defined(_DEBUG)
# pragma message("Using the /RTC option without specifying a debug runtime will lead to linker errors")
# pragma message("Hint: go to the code generation options and switch to one of the debugging runtimes")
# error "Incompatible build options"
#endif
//
// select toolset if not defined already:
//
#ifndef BOOST_LIB_TOOLSET
#if defined(BOOST_MSVC) && (BOOST_MSVC == 1200)
// vc6:
# define BOOST_LIB_TOOLSET "vc6"
#elif defined(BOOST_MSVC) && (BOOST_MSVC == 1300)
// vc7:
# define BOOST_LIB_TOOLSET "vc7"
#elif defined(BOOST_MSVC) && (BOOST_MSVC == 1310)
// vc71:
# define BOOST_LIB_TOOLSET "vc71"
#elif defined(BOOST_MSVC) && (BOOST_MSVC >= 1400)
// vc80:
# define BOOST_LIB_TOOLSET "vc80"
#elif defined(__BORLANDC__)
// CBuilder 6:
# define BOOST_LIB_TOOLSET "bcb"
#elif defined(__ICL)
// Intel C++, no version number:
# define BOOST_LIB_TOOLSET "iw"
#elif defined(__MWERKS__) && (__MWERKS__ <= 0x31FF )
// Metrowerks CodeWarrior 8.x
# define BOOST_LIB_TOOLSET "cw8"
#elif defined(__MWERKS__) && (__MWERKS__ <= 0x32FF )
// Metrowerks CodeWarrior 9.x
# define BOOST_LIB_TOOLSET "cw9"
#endif
#endif // BOOST_LIB_TOOLSET
//
// select thread opt:
//
#if defined(_MT) || defined(__MT__)
# define BOOST_LIB_THREAD_OPT "-mt"
#else
# define BOOST_LIB_THREAD_OPT
#endif
#if defined(_MSC_VER) || defined(__MWERKS__)
# ifdef _DLL
# if (defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION)) && (defined(_STLP_OWN_IOSTREAMS) || defined(__STL_OWN_IOSTREAMS))
# if defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG))
# define BOOST_LIB_RT_OPT "-gdp"
# elif defined(_DEBUG)
# define BOOST_LIB_RT_OPT "-gdp"
# pragma message("warning: STLPort debug versions are built with /D_STLP_DEBUG=1")
# error "Build options aren't compatible with pre-built libraries"
# else
# define BOOST_LIB_RT_OPT "-p"
# endif
# elif defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION)
# if defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG))
# define BOOST_LIB_RT_OPT "-gdpn"
# elif defined(_DEBUG)
# define BOOST_LIB_RT_OPT "-gdpn"
# pragma message("warning: STLPort debug versions are built with /D_STLP_DEBUG=1")
# error "Build options aren't compatible with pre-built libraries"
# else
# define BOOST_LIB_RT_OPT "-pn"
# endif
# else
# if defined(_DEBUG)
# define BOOST_LIB_RT_OPT "-gd"
# else
# define BOOST_LIB_RT_OPT
# endif
# endif
# else
# if (defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION)) && (defined(_STLP_OWN_IOSTREAMS) || defined(__STL_OWN_IOSTREAMS))
# if defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG))
# define BOOST_LIB_RT_OPT "-sgdp"
# elif defined(_DEBUG)
# define BOOST_LIB_RT_OPT "-sgdp"
# pragma message("warning: STLPort debug versions are built with /D_STLP_DEBUG=1")
# error "Build options aren't compatible with pre-built libraries"
# else
# define BOOST_LIB_RT_OPT "-sp"
# endif
# elif defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION)
# if defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG))
# define BOOST_LIB_RT_OPT "-sgdpn"
# elif defined(_DEBUG)
# define BOOST_LIB_RT_OPT "-sgdpn"
# pragma message("warning: STLPort debug versions are built with /D_STLP_DEBUG=1")
# error "Build options aren't compatible with pre-built libraries"
# else
# define BOOST_LIB_RT_OPT "-spn"
# endif
# else
# if defined(_DEBUG)
# define BOOST_LIB_RT_OPT "-sgd"
# else
# define BOOST_LIB_RT_OPT "-s"
# endif
# endif
# endif
#elif defined(__BORLANDC__)
//
// figure out whether we want the debug builds or not:
//
#if __BORLANDC__ > 0x561
#pragma defineonoption BOOST_BORLAND_DEBUG -v
#endif
//
// sanity check:
//
#if defined(__STL_DEBUG) || defined(_STLP_DEBUG)
#error "Pre-built versions of the Boost libraries are not provided in STLPort-debug form"
#endif
# ifdef _RTLDLL
# ifdef BOOST_BORLAND_DEBUG
# define BOOST_LIB_RT_OPT "-d"
# else
# define BOOST_LIB_RT_OPT
# endif
# else
# ifdef BOOST_BORLAND_DEBUG
# define BOOST_LIB_RT_OPT "-sd"
# else
# define BOOST_LIB_RT_OPT "-s"
# endif
# endif
#endif
//
// select linkage opt:
//
#if (defined(_DLL) || defined(_RTLDLL)) && defined(BOOST_DYN_LINK)
# define BOOST_LIB_PREFIX
#elif defined(BOOST_DYN_LINK)
# error "Mixing a dll boost library with a static runtime is a really bad idea..."
#else
# define BOOST_LIB_PREFIX "lib"
#endif
//
// now include the lib:
//
#if defined(BOOST_LIB_NAME) \
&& defined(BOOST_LIB_PREFIX) \
&& defined(BOOST_LIB_TOOLSET) \
&& defined(BOOST_LIB_THREAD_OPT) \
&& defined(BOOST_LIB_RT_OPT) \
&& defined(BOOST_LIB_VERSION)
#ifndef BOOST_AUTO_LINK_NOMANGLE
# pragma comment(lib, BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) "-" BOOST_LIB_TOOLSET BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT "-" BOOST_LIB_VERSION ".lib")
# ifdef BOOST_LIB_DIAGNOSTIC
# pragma message ("Linking to lib file: " BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) "-" BOOST_LIB_TOOLSET BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT "-" BOOST_LIB_VERSION ".lib")
# endif
#else
# pragma comment(lib, BOOST_STRINGIZE(BOOST_LIB_NAME) ".lib")
# ifdef BOOST_LIB_DIAGNOSTIC
# pragma message ("Linking to lib file: " BOOST_STRINGIZE(BOOST_LIB_NAME) ".lib")
# endif
#endif
#else
# error "some required macros where not defined (internal logic error)."
#endif
#endif // _MSC_VER || __BORLANDC__
//
// finally undef any macros we may have set:
//
#ifdef BOOST_LIB_PREFIX
# undef BOOST_LIB_PREFIX
#endif
#if defined(BOOST_LIB_NAME)
# undef BOOST_LIB_NAME
#endif
#if defined(BOOST_LIB_TOOLSET)
# undef BOOST_LIB_TOOLSET
#endif
#if defined(BOOST_LIB_THREAD_OPT)
# undef BOOST_LIB_THREAD_OPT
#endif
#if defined(BOOST_LIB_RT_OPT)
# undef BOOST_LIB_RT_OPT
#endif
#if defined(BOOST_LIB_LINK_OPT)
# undef BOOST_LIB_LINK_OPT
#endif
#if defined(BOOST_LIB_DEBUG_OPT)
# undef BOOST_LIB_DEBUG_OPT
#endif
#if defined(BOOST_DYN_LINK)
# undef BOOST_DYN_LINK
#endif
#if defined(BOOST_AUTO_LINK_NOMANGLE)
# undef BOOST_AUTO_LINK_NOMANGLE
#endif

View file

@ -1,17 +0,0 @@
/borland.hpp/1.1/Thu Oct 6 12:13:52 2005//
/comeau.hpp/1.1/Thu Oct 6 12:13:52 2005//
/common_edg.hpp/1.1/Thu Oct 6 12:13:52 2005//
/compaq_cxx.hpp/1.1/Thu Oct 6 12:13:52 2005//
/digitalmars.hpp/1.1/Thu Oct 6 12:13:52 2005//
/gcc.hpp/1.1/Thu Oct 6 12:13:52 2005//
/greenhills.hpp/1.1/Thu Oct 6 12:13:52 2005//
/hp_acc.hpp/1.1/Thu Oct 6 12:13:52 2005//
/intel.hpp/1.1/Thu Oct 6 12:13:52 2005//
/kai.hpp/1.1/Thu Oct 6 12:13:52 2005//
/metrowerks.hpp/1.1/Thu Oct 6 12:13:52 2005//
/mpw.hpp/1.1/Thu Oct 6 12:13:52 2005//
/sgi_mipspro.hpp/1.1/Thu Oct 6 12:13:52 2005//
/sunpro_cc.hpp/1.1/Thu Oct 6 12:13:52 2005//
/vacpp.hpp/1.1/Thu Oct 6 12:13:52 2005//
/visualc.hpp/1.1/Thu Oct 6 12:13:52 2005//
D

View file

@ -1 +0,0 @@
eo/contrib/boost/config/compiler

View file

@ -1 +0,0 @@
:ext:evomarc@eodev.cvs.sourceforge.net:/cvsroot/eodev

View file

@ -1,175 +0,0 @@
// (C) Copyright John Maddock 2001 - 2003.
// (C) Copyright David Abrahams 2002 - 2003.
// (C) Copyright Aleksey Gurtovoy 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 for most recent version.
// Borland C++ compiler setup:
// Version 5.0 and below:
# if __BORLANDC__ <= 0x0550
// Borland C++Builder 4 and 5:
# define BOOST_NO_MEMBER_TEMPLATE_FRIENDS
# if __BORLANDC__ == 0x0550
// Borland C++Builder 5, command-line compiler 5.5:
# define BOOST_NO_OPERATORS_IN_NAMESPACE
# endif
# endif
// Version 5.51 and below:
#if (__BORLANDC__ <= 0x551)
# define BOOST_NO_CV_SPECIALIZATIONS
# define BOOST_NO_CV_VOID_SPECIALIZATIONS
# define BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
# define BOOST_NO_DEDUCED_TYPENAME
// workaround for missing WCHAR_MAX/WCHAR_MIN:
#include <climits>
#include <cwchar>
#ifndef WCHAR_MAX
# define WCHAR_MAX 0xffff
#endif
#ifndef WCHAR_MIN
# define WCHAR_MIN 0
#endif
#endif
// Version 7.0 (Kylix) and below:
#if (__BORLANDC__ <= 0x570)
# define BOOST_NO_SFINAE
# define BOOST_NO_INTEGRAL_INT64_T
# define BOOST_NO_DEPENDENT_NESTED_DERIVATIONS
# define BOOST_NO_PRIVATE_IN_AGGREGATE
# define BOOST_NO_USING_TEMPLATE
# define BOOST_BCB_PARTIAL_SPECIALIZATION_BUG
# define BOOST_NO_TEMPLATE_TEMPLATES
# define BOOST_NO_USING_DECLARATION_OVERLOADS_FROM_TYPENAME_BASE
# define BOOST_NO_MEMBER_TEMPLATE_FRIENDS
// we shouldn't really need this - but too many things choke
// without it, this needs more investigation:
# define BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
# define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL
# define BOOST_NO_IS_ABSTRACT
# ifdef NDEBUG
// fix broken <cstring> so that Boost.test works:
# include <cstring>
# undef strcmp
# endif
//
// new bug in 5.61:
#if (__BORLANDC__ >= 0x561) && (__BORLANDC__ <= 0x570)
// this seems to be needed by the command line compiler, but not the IDE:
# define BOOST_NO_MEMBER_FUNCTION_SPECIALIZATIONS
#endif
# ifdef _WIN32
# define BOOST_NO_SWPRINTF
# elif defined(linux) || defined(__linux__) || defined(__linux)
// we should really be able to do without this
// but the wcs* functions aren't imported into std::
# define BOOST_NO_STDC_NAMESPACE
// _CPPUNWIND doesn't get automatically set for some reason:
# pragma defineonoption BOOST_CPPUNWIND -x
# endif
#endif
//
// Post 0x561 we have long long and stdint.h:
#if __BORLANDC__ >= 0x561
# ifndef __NO_LONG_LONG
# define BOOST_HAS_LONG_LONG
# endif
// On non-Win32 platforms let the platform config figure this out:
# ifdef _WIN32
# define BOOST_HAS_STDINT_H
# endif
#endif
// Borland C++Builder 6 defaults to using STLPort. If _USE_OLD_RW_STL is
// defined, then we have 0x560 or greater with the Rogue Wave implementation
// which presumably has the std::DBL_MAX bug.
#if ((__BORLANDC__ >= 0x550) && (__BORLANDC__ < 0x560)) || defined(_USE_OLD_RW_STL)
// <climits> is partly broken, some macros define symbols that are really in
// namespace std, so you end up having to use illegal constructs like
// std::DBL_MAX, as a fix we'll just include float.h and have done with:
#include <float.h>
#endif
//
// __int64:
//
#if (__BORLANDC__ >= 0x530) && !defined(__STRICT_ANSI__)
# define BOOST_HAS_MS_INT64
#endif
//
// check for exception handling support:
//
#if !defined(_CPPUNWIND) && !defined(BOOST_CPPUNWIND) && !defined(__EXCEPTIONS)
# define BOOST_NO_EXCEPTIONS
#endif
//
// all versions have a <dirent.h>:
//
#ifndef __STRICT_ANSI__
# define BOOST_HAS_DIRENT_H
#endif
//
// all versions support __declspec:
//
#ifndef __STRICT_ANSI__
# define BOOST_HAS_DECLSPEC
#endif
//
// ABI fixing headers:
//
#if __BORLANDC__ < 0x600 // not implemented for version 6 compiler yet
#ifndef BOOST_ABI_PREFIX
# define BOOST_ABI_PREFIX "boost/config/abi/borland_prefix.hpp"
#endif
#ifndef BOOST_ABI_SUFFIX
# define BOOST_ABI_SUFFIX "boost/config/abi/borland_suffix.hpp"
#endif
#endif
//
// Disable Win32 support in ANSI mode:
//
#if __BORLANDC__ < 0x600
# pragma defineonoption BOOST_DISABLE_WIN32 -A
#elif defined(__STRICT_ANSI__)
# define BOOST_DISABLE_WIN32
#endif
//
// MSVC compatibility mode does some nasty things:
//
#if defined(_MSC_VER) && (_MSC_VER <= 1200)
# define BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP
# define BOOST_NO_VOID_RETURNS
#endif
#define BOOST_COMPILER "Borland C++ version " BOOST_STRINGIZE(__BORLANDC__)
//
// versions check:
// we don't support Borland prior to version 5.4:
#if __BORLANDC__ < 0x540
# error "Compiler not supported or configured - please reconfigure"
#endif
//
// last known and checked version is 1536 (Builder X preview):
#if (__BORLANDC__ > 1536)
# if defined(BOOST_ASSERT_CONFIG)
# error "Unknown compiler version - please run the configure tests and report the results"
# else
# pragma message( "Unknown compiler version - please run the configure tests and report the results")
# endif
#endif

View file

@ -1,59 +0,0 @@
// (C) Copyright John Maddock 2001.
// (C) Copyright Douglas Gregor 2001.
// (C) Copyright Peter Dimov 2001.
// (C) Copyright Aleksey Gurtovoy 2003.
// (C) Copyright Beman Dawes 2003.
// (C) Copyright Jens Maurer 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)
// See http://www.boost.org for most recent version.
// Comeau C++ compiler setup:
#include "boost/config/compiler/common_edg.hpp"
#if (__COMO_VERSION__ <= 4245)
# if defined(_MSC_VER) && _MSC_VER <= 1300
# if _MSC_VER > 100
// only set this in non-strict mode:
# define BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP
# endif
# endif
// Void returns don't work when emulating VC 6 (Peter Dimov)
# if defined(_MSC_VER) && (_MSC_VER == 1200)
# define BOOST_NO_VOID_RETURNS
# endif
#endif // version 4245
//
// enable __int64 support in VC emulation mode
//
# if defined(_MSC_VER) && (_MSC_VER >= 1200)
# define BOOST_HAS_MS_INT64
# endif
#define BOOST_COMPILER "Comeau compiler version " BOOST_STRINGIZE(__COMO_VERSION__)
//
// versions check:
// we don't know Comeau prior to version 4245:
#if __COMO_VERSION__ < 4245
# error "Compiler not configured - please reconfigure"
#endif
//
// last known and checked version is 4245:
#if (__COMO_VERSION__ > 4245)
# if defined(BOOST_ASSERT_CONFIG)
# error "Unknown compiler version - please run the configure tests and report the results"
# endif
#endif

View file

@ -1,62 +0,0 @@
// (C) Copyright John Maddock 2001 - 2002.
// (C) Copyright Jens Maurer 2001.
// (C) Copyright David Abrahams 2002.
// (C) Copyright Aleksey Gurtovoy 2002.
// (C) Copyright Markus Schoepflin 2005.
// 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 for most recent version.
//
// Options common to all edg based compilers.
//
// This is included from within the individual compiler mini-configs.
#ifndef __EDG_VERSION__
# error This file requires that __EDG_VERSION__ be defined.
#endif
#if (__EDG_VERSION__ <= 238)
# define BOOST_NO_INTEGRAL_INT64_T
# define BOOST_NO_SFINAE
#endif
#if (__EDG_VERSION__ <= 240)
# define BOOST_NO_VOID_RETURNS
#endif
#if (__EDG_VERSION__ <= 241) && !defined(BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP)
# define BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP
#endif
#if (__EDG_VERSION__ <= 244) && !defined(BOOST_NO_TEMPLATE_TEMPLATES)
# define BOOST_NO_TEMPLATE_TEMPLATES
#endif
#if (__EDG_VERSION__ < 300) && !defined(BOOST_NO_IS_ABSTRACT)
# define BOOST_NO_IS_ABSTRACT
#endif
#if (__EDG_VERSION__ <= 303) && !defined(BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL)
# define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL
#endif
// See also kai.hpp which checks a Kai-specific symbol for EH
# if !defined(__KCC) && !defined(__EXCEPTIONS)
# define BOOST_NO_EXCEPTIONS
# endif
# if !defined(__NO_LONG_LONG)
# define BOOST_HAS_LONG_LONG
# endif
#ifdef c_plusplus
// EDG has "long long" in non-strict mode
// However, some libraries have insufficient "long long" support
// #define BOOST_HAS_LONG_LONG
#endif

View file

@ -1,19 +0,0 @@
// (C) Copyright John Maddock 2001 - 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)
// See http://www.boost.org for most recent version.
// Dec Alpha True64 C++ compiler setup:
#define BOOST_COMPILER "Dec Alpha True64 " BOOST_STRINGIZE(__DECCXX_VER)
#include "boost/config/compiler/common_edg.hpp"
//
// versions check:
// Nothing to do here?

Some files were not shown because too many files have changed in this diff Show more