[galib] How to change MIN/MAX mapping values in a GABin2DecPhenotype

Christian Samuel Perone christian_perone at yahoo.com.br
Tue Jun 14 10:40:39 EDT 2005


Changing the map after calling the GABin2DecGenome
constructor don't cause a change in the Genome
phenotypes, because the constructor creates
a copy of the map and not a reference to the map.
I thought that there is no way to change the
min and max val of the phenotypes after initialize
the genome without modify the library. But maybe have
other ways to solve your problem, if you explain
better the problem.


--- dario longo <dario.longo at unito.it> escreveu:

> dear galib users,I'm writing a program using
> GABin2DecGenome in which my genome is composed of 5
> phenotypes to describe 5 float variables of my
> objective function. I've create the phenotypes with
> >map.add (number_of_bits, min_value, max_value)then
> I instantiate the genome, do ga.step and so on.
> After a n number of steps I  would to change the
> min_value and max_value of the second phenotype. In
> which way could I do it?I've tried with>map.min(1) =
> value;but I obtain the error: non-lvalue in
> assignement.I've tried also using pointers to
> min_value and max_value and to map.min and map.max,>
> float *pmin;> pmin = &min_value;> *pmin =
> new_min_value; but it doesn't work.Could anyone help
> me?thank you in advance,dario>
_______________________________________________
> galib mailing list
> galib at mit.edu
> http://mailman.mit.edu/mailman/listinfo/galib
> 



	
	
		
____________________________________________________
Yahoo! Mail, cada vez melhor: agora com 1GB de espaço grátis! http://mail.yahoo.com.br


More information about the galib mailing list