|
From: Laszlo G. <gu...@la...> - 2001-12-05 01:13:42
|
At 10:32 AM 12/2/01 -0500, Nick Collier wrote: >On Fri, 2001-11-30 at 21:46, Laszlo Gulyas wrote: >[...] > > - I tend to like the use of ObjectLocation in the multi-occupation grids. > > Maybe, we should provide this functionality in all discrete grids. > > (I am lacking it when I want to implement moving -- it's OK that I can > > grab my neighbors, but it would also be nice if I could grab the > > neighborous > > cells/locations, too.) > >I was hoping to do this soon after I wrote the multi-occupancy grid, but >I never got around to it. Its still on the list, but feel free to do it >yourself, if you have the time :). OK, I'll feel, but these times I am not that rich timewise, either... :-) > > > > - Finally, in Node (in the networking library), it would be nice to have > > something > > like getEdgeTo(Node), which would return the edge that connects the > > actual node > > to the parameter (or null). > >I added a some new methods along this line to DefaultNode last thurs. >and can certainly add this as well. However, these new methods recognize >that a node may have multiple edges to or from another node. For >example, a son may have a business link and a family link with his >father. Internally there is now a HashMap with nodes as keys and a >HashSet of edges as values. Given this, what would be better do you >think -- > >public Iterator getEdgesTo(Node node) > >or > >public HashSet getEdgesTo(Node node) Good question. I have no preference right now, as I have no concrete example in mind yet to match them to. So, I'd probably go for the more general one, which is the latter. 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 |