From: Arjen M. <arj...@wl...> - 2005-04-18 06:41:15
|
Andrew Ross wrote: > > > There is no guarantee about the positioning or ordering of the vectors. > They could be randomly placed. In fact I have had need to do this > myself. In this case it is not trivial to decide the appropriate spacing > while keeping the algorithm efficient for the normal large grid of > regularly spaced vectors. I'm sure I can do better than the current > approach though. > I propose a very simple algorithm: - Determine a bounding box for the grid points/data points - Divide its area by the total number of points - this gives a raw indication of the average grid cell - Take the square root to get a typical size This ought to be efficient and effective for most situations, except where you have very small clusters. Regards, Arjen |