Changeset 257 for cpp/frams/genetics


Ignore:
Timestamp:
12/03/14 18:52:05 (6 years ago)
Author:
Maciej Komosinski
Message:
  • added strmove(): strcpy() for overlapping strings
  • ExtObject? operator== can handle NULL arguments
  • source formatting and improved genetic operator messages
File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpp/frams/genetics/genman.cpp

    r247 r257  
    300300{
    301301        char format = g1.getFormat();
    302         if (format != g2.getFormat()) return Geno(SString::empty(), -1, SString::empty(), SString::sprintf("GENOPER_NOOPER: CrossOver() does not know how to handle parents with differing genetic formats (%c and %c)", format, g2.getFormat()));
     302        if (format != g2.getFormat()) return Geno(SString::empty(), -1, SString::empty(), SString::sprintf("GENOPER_NOOPER: CrossOver(): does not work for parents with differing genetic formats (%c and %c)", format, g2.getFormat()));
    303303        GenoOperators *gf = getOper_f(format);
    304304        if (gf == NULL)
    305                 return Geno(SString::empty(), -1, SString::empty(), SString::sprintf("GENOPER_NOOPER: CrossOver(): don't know how to handle genetic format %c", format));
     305                return Geno(SString::empty(), -1, SString::empty(), SString::sprintf("GENOPER_NOOPER: CrossOver(): no operators found for genetic format %c", format));
    306306        Geno g1v = g1, g2v = g2;
    307307
Note: See TracChangeset for help on using the changeset viewer.