From: Clifford Heath Date: 2008-01-19T20:44:58+09:00 Subject: Re: kD-Trees implementation Marcin Raczkowski wrote: > class KDNode .... > def parase(points, depth = 0) .... > points = points.sort_by{|point| point[@axis]} Is this the standard way to build a kdtree? Seems awfully wasteful to re-sort the values for each level. Can't you build @dim copies of the original array, each sorted one on that dim, then build the kdtree over the partitions on that? Clifford Heath.