Problem setting population sorting on MSVC

Fredric V. Echols rwf at gpcom.net
Tue Dec 10 16:44:41 EST 2002


Hello everyone,

    I am using a system in which a genetic algorithm is being used to
produce signals, and the fitness function works by determining signal error
using Mean Squared Error. Obviously, the lower the error, the better the
genome is. Anyway, when I try to set the population to use the "lower is
better" mode, I get this from MSVC 6.0:

"error C2663: 'order' : 2 overloads have no legal conversion for 'this'
pointer"

    Here is the relevant code:

---
// Genome type
#define GenomeT unsigned char
#define GAGenomeT GA1DArrayAlleleGenome<GenomeT>

// Allele set
GAAlleleSet<GenomeT> Allele(0, 255);

// Genome
GAGenomeT genome(2, Allele, Objective);

// Set up genome
genome.initializer(Initializer);

// GA
GASimpleGA ga(genome);

// Set sort order

ga.population().order(GAPopulation::LOW_IS_BEST);

---

    The last line is where the problem lies, according to the compiler.

    Thanks for your time!

-Fredric Echols




More information about the galib mailing list