Subversion Repositories gelsvn

Rev

Rev 61 | Rev 125 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 61 Rev 89
Line 1... Line -...
1
/** Author: J. Andreas Bærentzen, (c) 2003
-
 
2
		This is a simple KDTree data structure. It is written using templates, and
-
 
3
		it is parametrized by both key and value. 
-
 
4
*/
-
 
5
 
-
 
6
#ifndef __KDTREE_H
1
#ifndef __KDTREE_H
7
#define __KDTREE_H
2
#define __KDTREE_H
8
 
3
 
9
#include <cmath>
4
#include <cmath>
10
#include <iostream>
5
#include <iostream>
Line 12... Line 7...
12
#include <algorithm>
7
#include <algorithm>
13
#include "CGLA/CGLA.h"
8
#include "CGLA/CGLA.h"
14
 
9
 
15
namespace Geometry
10
namespace Geometry
16
{
11
{
17
	/** A classic K-D tree. 
12
	/** \brief A classic K-D tree. 
-
 
13
 
18
			A K-D tree is a good data structure for storing points in space
14
			A K-D tree is a good data structure for storing points in space
19
			and for nearest neighbour queries. It is basically a generalized 
15
			and for nearest neighbour queries. It is basically a generalized 
20
			binary tree in K dimensions. */
16
			binary tree in K dimensions. */
21
	template<class KeyT, class ValT>
17
	template<class KeyT, class ValT>
22
	class KDTree
18
	class KDTree