Home    Personal    Work    Computers    Miscellaneous

LaTeX    Software Projects    Rendering Tutorial    UNIX Commands    Using CVS    Case Modding    Base Wiki

GALib

galib is a C++ library for implementing genetic algorithms. This page offers patches that allows better C++ compliance, as required by gcc-3.4, see e.g. the following threads on the galib mailing list reporting these problems: 1, 2, 3

galib-2.4.5-al1

You can download galib-2.4.5-al1.tar.gz here, or you can find the diff patch.

Notes with galib-2.4.5-al1

This adaptation was necessary to compile galib-2.4.5 with gcc-3.4. Since gcc-3.4 requires more compliance with the standard, tighter use of template inheritance and scoping in galib-2.4.5 was required.

Note that this patch is not completely checked, and more problems may turn up upon compilation of specific applications using galib-2.4.5-al1 with gcc-3.4. Disclaimer: I cannot guarantee anything for this patch. Please send your bugs and further patch requests for compliance of galib-2.4.5-al1 with gcc-3.4 to anthony@liekens.net

The following changes were required for getting galib-2.4.5 compiled for gcc-3.4, resulting in galib-2.4.5-al1

  • Random functionality in ga/garandom.h and ga/garandom.C is now in a GARandom namespace, thus if you use random functions of garandom.h, make sure to use the correct namespace, e.g.

        #include <ga/garandom.h>
        using namespace GARandom;

or call these functions from within their GARandom namespace, e.g. use

        GARandom::GARandomInt();

to access the functions.

Because of the addition of a namespace, I had to drop all random number generators, except for the default ran2() and sran2() functions, which have now been renamed to ran() and sran(). If you need other random functions, you'll have to go back to an older version of galib and patch the function you want into ga/garandom.C

  • Inheritance of templates is now in compliance with the C++ standard
  • Friend operators == and != of GAAlleleSet<T> are now also according to the standard
  • Deprecated inclusions of <iostream.h> and <fstream.h> have been replaced by the correct <iostream> and <fstream> includes
  • Corrected warnings of comparisons of ints with unsigned ints

Edit (locked) - History - Recent Changes - Search - Statistics
All contents copyrighted 2000-2006 Anthony Liekens unless otherwise noted. Powered by PmWiki
Page last modified on October 20, 2005, at 07:01 PM.