[galib] Obtain "bestIndividual()" value

Luca Moscatelli lucaster at gmail.com
Tue Nov 2 19:02:47 EST 2004


Hi to all.
I tried the first examples and they are all clear, and I saw that the
best individual is only printed at the end of each program, but what
have I to do if I want to use it?

I'll try to be more clear:
I created a GARealAlleleSet, filled and inserted into the
GARealGenome, then I evolved it.
If I print the best individual like in the examples with "cout <<
ga.statistics().bestIndividual()" I see the right value, but now I
want, for example, to add 1 to this value...

Now, I looked the documentation and I saw that the
ga.statistics().bestIndividual() returns a GaGenome&,  how can I put
this value(s) in a float variable(s)?

Thanks in advance to all of you!
Bye,
Luca


More information about the galib mailing list