From: Edwin P. <ed...@pe...> - 2008-05-19 10:21:43
|
On Monday 19 May 2008 11:17:01 David Rooke wrote: > 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. Yes, this is supported. For example, the DomainParser accepts domain descriptions of the form "T(min_1, max_1), T(min_2, max_2), ..., R(min_n, max_n)", where T is the type and the arguments min_x and max_x correspond to minimum and maximums for the xth dimension of the search space respectively. > Also, what is the default granularity of the search space? Is it > configurable, if so how? If by granularity you are referring to the type, then yes. Z for integer, R for real, B for boolean, etc. The Type hierarchy is also extensible, so you can implement your own types if you so require. Note that there are also types implemented for trees and graphs to represent genetic programs, etc. > 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: Out of curiosity, what are you using to provide the glue between C# and Java? I gather the getClone() method is supposed to make a deep copy of your problem, but I have no idea why it's been done this way - that's something new since I last looked at that particular code... Gary, what makes use of the getClone() method? Is there any reason why we don't rely on http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Cloneable.html instead? > public OptimisationProblem getClone() > { > return this.getClone; > } Looks like getClone() is recursively calling itself, which is probably not what you want to be doing... Can you post your complete code? > 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;) We'll do our best. :) Gary, we really do need to get some up to date documentation fleshed out. In our defence though, the framework has been somewhat of a moving target with respect to getting documentation nailed down. Regards, Edwin Peer -- #include http://www.peer.co.za/~espeer/disclaimer.html |