How to access a single bit of GAStatistics::bestIndividual()??
Yossi Mossel
ymossel at hotmail.com
Tue Nov 19 05:18:37 EST 2002
You need to get the genome as a pointer and cast it, as follows:
YourGenomeClass* Genome =
(YourGenomeClass*)ga->statistics().bestIndividual().clone();
int i = Genome->gene(index);
----Original Message Follows----
From: "S. YU" <iku713 at yahoo.com>
Reply-To: galib at mit.edu
To: galib at mit.edu
Subject: How to access a single bit of GAStatistics::bestIndividual()??
Date: Sun, 17 Nov 2002 11:42:01 -0800 (PST)
Dear GAlib-ers:
After I get the bestIndividual, it's a 100-bit binary
string, and I want to read this bestIndividual and
write
it to another array, so that I can access the single
bit. But can I do that,since the bestIndividual is
GAGenome type.
Thanks for your help,
S.Yu
__________________________________________________
Do you Yahoo!?
Yahoo! Web Hosting - Let the expert host your site
http://webhosting.yahoo.com
_______________________________________________
galib mailing list
galib at mit.edu
http://lancet.mit.edu/mailman/listinfo/galib
_________________________________________________________________
The new MSN 8: advanced junk mail protection and 2 months FREE*
http://join.msn.com/?page=features/junkmail
More information about the galib
mailing list