Print

Print


Okay Sean,

I'll try it with ERC. 

Thank you.

Bojan

----- Urspr√ľngliche Mail -----
Von: "Sean Luke" <[log in to unmask]>
An: [log in to unmask]
Gesendet: Samstag, 25. Mai 2013 13:21:52
Betreff: Re: Getting random Numbers

I'm sorry, I was sleepy when I wrote that.  I meant "ERC", not "ADF".

Sean

On May 23, 2013, at 5:29 PM, Bojan Janisch wrote:

> Okay thanks Sean.
> 
> Do you have a little example how to override the ADF facility? I can't get any information about the ADF code from the manual.
> 
> Greetings from Germany
> 
> Bojan
> 
> ----- Urspr√ľngliche Mail -----
> Von: "Sean Luke" <[log in to unmask]>
> An: [log in to unmask]
> Gesendet: Mittwoch, 22. Mai 2013 16:13:49
> Betreff: Re: Getting random Numbers
> 
> On May 22, 2013, at 5:31 AM, Bojan Janisch wrote:
> 
>> Sorry for the late response. My work started late this week, because of holidays. 
>> 
>> So here is a sample code of my problem. I have a GPNode called Faktum that has a overridden setup method which looks like this:
>> 
>> @Override
>> public void setup(final EvolutionState state, final Parameter base) {
>> 	super.setup(state, base);
>> 	setMethod(state.random[0].nextInt(c.getDeclaredMethods().length));
>> }
>> 
>> also the setMethod:
>> 
>> public void setMethod(int i) {
>> 	types = new ArrayList<Type>();
>> 	method = c.getDeclaredMethods()[i];
>> 	for (Type t : method.getGenericParameterTypes()) {
>> 		types.add(t);
>> 	}
>> }
> 
> setup is only called a single time.  I think what you want to do is override the ADF facility.
> 
> Sean
>