|
From: North, M. <no...@an...> - 2002-11-16 01:16:07
|
Tom: =20 The topology issues that we discussed might be represented as follows: =20 1.) An abstract Topology class or interface can be defined: a. The class has a method, getDistance(Object o1, Object o2), = that returns the distance between any two objects. b. The Topology class has appropriate methods to get neighbors = within a certain range such as getNeighbors(Object o1, double range) . 2.) Three or more concrete Topology implementation classes can then = be defined: a. An implementation for Moore neighborhoods, von Neumann neighborhoods, and hexagonal neighborhoods based on the current grid implementation can be defined. This would use the current array-based = grid storage and maintain backward compatibility. Since it is essentially = the current implementation, it would run as fast as the current code. b. An implementation for metric spaces can be defined that uses = trees to store objects and find neighbors. This can be done since the rules = of a metric space allow tree storage. For example see http://www.vldb.org/conf/1997/P426.PDF <http://www.vldb.org/conf/1997/P426.PDF> . Other implementations are = also available, especially for large lists. For example, see http://portal.acm.org/citation.cfm?id=3D328959 <http://portal.acm.org/citation.cfm?id=3D328959&dl=3DACM&coll=3Dportal> &dl=3DACM&coll=3Dportal. This implementation would run slower than the = current code but it would still be reasonable for most problems. The price of slower execution is made up for by the added flexibility. c. An implementation for completely abstract (i.e. non-metric) = spaces can be defined that uses a simple list to store objects and a na=EFve = all pairs matching algorithm to find neighbors. The algorithm will simply = test the distance between each object to find neighbors. This = implementation will be much slower than the current code for large lists but the = slower execution will be made up for by the increased flexibility, at least = for initial testing. Users that find they need a particularly abstract = notion of space are free to develop optimized versions of the Topology class = as they see fit. 3.) Users select the fastest concrete implementation class that = supports their model's notion of space. Of course, users are also free to = extend or add to the existing concrete classes. =20 Mike =20 =20 |