From: David R. <dav...@nt...> - 2008-05-19 09:17:27
|
Hi, Thanks for the prompt feedback. I can now see the mechanism for specifying the search space. In my case I think I'll run call setDomain from the constuctor - that should do the job. However, I have a couple more questions, one on the search space and another on the inheritance of the interfaces. Regarding the searchspace, does CILib support irregularly shaped search spaces? That is, non-cuboid? This is why I have each dimension of my search domain held in a collection, so that each dimension can be of any length. Also, what is the default granularity of the search space? Is it configurable, if so how? Otherwise, I think I'll go with your types for now but look into creating my own later (I do have one or two that are applicable). And on inheritance, I've built the shell of my optimization problem and C# is complaining to me in a way that tells me it expects me to build 3 instances of the getClone method (Cloneable, Problem and OptimizationProblem). I'm not a coding veteran so I suspect I'm misinterpreting what the compiler's trying to tell me: Error 1 'PSOProb.OProblem' does not implement interface member 'net.sourceforge.cilib.problem.Problem.getClone()'. 'PSOProb.OProblem.getClone()' cannot implement 'net.sourceforge.cilib.problem.Problem.getClone()' because it does not have the matching return type of 'net.sourceforge.cilib.problem.Problem'. D: \Source\PSO\PSOProb\PSO.cs 14 11 PSOProb Error 2 'PSOProb.OProblem' does not implement interface member 'net.sourceforge.cilib.util.Cloneable.getClone()'. 'PSOProb.OProblem.getClone()' cannot implement 'net.sourceforge.cilib.util.Cloneable.getClone()' because it does not have the matching return type of 'object'. D: \Source\PSO\PSOProb\PSO.cs 14 11 PSOProb I have the OptimizationProblem required instance of getClone specified with: public OptimisationProblem getClone() { return this.getClone; } The demands of the interfaces have led me to implement similar code for Problem and Cloneable. Clearly, I should not be having to specify 3 methods for getClone. What do you suspect is wrong here? BTW, here's how I'm declaring the class: class OProblem : OptimisationProblem Once again, thanks for your help. The documentation is a little light so I do appreciate your assistance as I attempt to move from crawling to walking;) Regards, Dave |