|
From: Laszlo G. <gu...@la...> - 2001-11-21 22:08:42
|
Hi All, I've continued my work on hexagonal spaces and came across a couple of new issues. First of all, it turns out that, in the end, I might need to revise my earlier musings on the design of the space classes. (:-)) The problem is that in the original grid classes getXXXNeighbors (XXX=VonNeumann or Moore) and findMaximum/ findMinimum have _two_ extent parameters. (One for the horizontal and one for the vertical extent.) In terms of the hexa grid, however, I am having hard time to come up with a meaningful interpretation of these. This would not be a problem in itself, but this means that it is going to be hard to create a common interface for these classes. (That is, unless we keep the core functionality only in the interface and put this additional functionality into the respective subclasses.) What would be your advice on this? Second, I am having problems with the Diffuse2D class. I thought, I could provide a hexagonal version of this class, too. My problem, however, is that the diffusion rules seem somewhat awkward to me. Any idea how they should be implemented on a hexagonal grid? Or at least, what they are based on? (Except that they are based on Swarm. :-)) Finally, I noticed that the compareMax.compareMin methods are private in Object2DGrid. Any reason these should not be available to subclasses? (I can live with them as they are, I am just wondering if I overlooked something. It would be nice to know, since I am designing my own space classes, and certainly I want to learn from what is already in the lib.) Thanks! Gulya . -- Laszlo Gulyas, MSc Phone: (617) 384-9216 Government Department Weatherhead Center for International Affairs Harvard University 602C Coolidge Hall 1737 Cambridge street Cambridge, MA-02138 |