shape_doc 0.1
/Users/mourrain/Devel/mmx/shape/include/shape/kdtree_cell.hpp
Go to the documentation of this file.
00001 /*****************************************************************************
00002  * M a t h e m a g i x
00003  *****************************************************************************
00004  * Bernard Mourrain
00005  *****************************************************************************
00006  *               Copyright (C) 2011 INRIA Sophia-Antipolis
00007  *****************************************************************************
00008  * Comments :
00009  ****************************************************************************/
00010 # ifndef _shape_kdtree_cell_hpp_
00011 # define _shape_kdtree_cell_hpp_
00012 
00013 # include <shape/list.hpp>
00014 # include <shape/kdtree.hpp>
00015 
00016 # define TMPL  template<class Object, class CELL>
00017 # define TMPL1 template<class K>
00018 # define SELF  kdtree_cell<Object,CELL> 
00019 
00020 //====================================================================
00021 namespace mmx {
00022 namespace shape {
00023 //====================================================================
00024 
00025 TMPL struct kdtree_cell  {
00026 
00027   typedef node<Object*, CELL *>            Node;
00028   typedef kdtree<Object*, CELL *>          Kdtree;
00029 
00030   Node* root() { return m_tree.root(); }
00031 
00032 public:
00033   Kdtree              m_tree ;
00034   std::list<Node *>   m_nodes ;
00035   Seq<CELL *>         m_leaves ;
00036   std::map<CELL*,Node*>    m_map;
00037 
00038 };
00039 
00040 //====================================================================
00041 }
00042 }
00043 //====================================================================
00044 # undef TMPL
00045 # undef TMPL1
00046 # undef SELF 
00047 # endif