ECJ-INTEREST-L Archives

October 2016

ECJ-INTEREST-L@LISTSERV.GMU.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Márcio Basgalupp <[log in to unmask]>
Reply To:
ECJ Evolutionary Computation Toolkit <[log in to unmask]>
Date:
Thu, 20 Oct 2016 14:36:43 -0200
Content-Type:
text/plain
Parts/Attachments:
text/plain (30 lines)
Dear all,

In my application, I have extended Evolve class (here called
MyEvolve.java). In this class, I need to instantiate an object from
another class created by my (let's say MyClass obj = new MyClass()).
However, I need to use this object in the evaluate method (implemented
in my problem).

How could I pass this object from MyEvolve (extending Evolve.java) to
MyProblem (public class myProblem extends Problem implements
SimpleProblemForm)? This object can not be static, that's why I need
to pass as a parameter. However, ECJ will call the evaluate
implemented according to SimpleProblemForm (exactly the same
parameters). Then, I need to know where ECJ calls evaluate(),  then I
can change it to call a different evaluate (with an additional param),
and add a new evaluate method in SimpleProblemForm (one more
parameter: MyClass obj) or implement a new interface (that also
implements SimpleProblemForm).

Could someone give me directions to solve this, please?

Best,
Márcio

--------
Prof. Dr. Márcio Porto Basgalupp
Instituto de Ciência e Tecnologia (ICT)
Universidade Federal de São Paulo (UNIFESP)
Tel: +55 12 3924-9500 (r: 9762)

ATOM RSS1 RSS2