|
Boost-Commit : |
From: mariano.consoni_at_[hidden]
Date: 2008-07-28 14:27:51
Author: mconsoni
Date: 2008-07-28 14:27:50 EDT (Mon, 28 Jul 2008)
New Revision: 47855
URL: http://svn.boost.org/trac/boost/changeset/47855
Log:
- More and more documentation.
Text files modified:
sandbox/SOC/2008/spacial_indexing/boost/spatial_index/helpers.hpp | 12 ++
sandbox/SOC/2008/spacial_indexing/boost/spatial_index/quadtree.hpp | 43 ++++++++++
sandbox/SOC/2008/spacial_indexing/boost/spatial_index/quadtree_node.hpp | 33 +++++++
sandbox/SOC/2008/spacial_indexing/boost/spatial_index/rtree.hpp | 80 +++++++++++++++++--
sandbox/SOC/2008/spacial_indexing/boost/spatial_index/rtree_leaf.hpp | 73 ++++++++++++++++--
sandbox/SOC/2008/spacial_indexing/boost/spatial_index/rtree_node.hpp | 156 +++++++++++++++++++++++++++++++--------
6 files changed, 338 insertions(+), 59 deletions(-)
Modified: sandbox/SOC/2008/spacial_indexing/boost/spatial_index/helpers.hpp
==============================================================================
--- sandbox/SOC/2008/spacial_indexing/boost/spatial_index/helpers.hpp (original)
+++ sandbox/SOC/2008/spacial_indexing/boost/spatial_index/helpers.hpp 2008-07-28 14:27:50 EDT (Mon, 28 Jul 2008)
@@ -19,7 +19,9 @@
{
- /// given two boxes, create the minimal box that contains them
+ /**
+ * \brief Given two boxes, returns the minimal box that contains them
+ */
template < typename Point >
geometry::box < Point > enlarge_box(const geometry::box < Point > &b1,
const geometry::box < Point > &b2)
@@ -41,7 +43,10 @@
return geometry::box < Point > (min, max);
}
- /// compute the area of the union of b1 and b2
+
+ /**
+ * \brief Compute the area of the union of b1 and b2
+ */
template < typename Point >
double compute_union_area(const geometry::box < Point > &b1,
const geometry::box < Point > &b2)
@@ -51,6 +56,9 @@
}
+ /**
+ * \brief Checks if boxes overlap
+ */
template < typename Point >
bool overlaps(const geometry::box < Point > &b1,
const geometry::box < Point > &b2)
Modified: sandbox/SOC/2008/spacial_indexing/boost/spatial_index/quadtree.hpp
==============================================================================
--- sandbox/SOC/2008/spacial_indexing/boost/spatial_index/quadtree.hpp (original)
+++ sandbox/SOC/2008/spacial_indexing/boost/spatial_index/quadtree.hpp 2008-07-28 14:27:50 EDT (Mon, 28 Jul 2008)
@@ -26,23 +26,37 @@
template < typename Point, typename Value > class quadtree
{
public:
+ /**
+ * \brief Creates a quadtree using r as bounding box
+ */
quadtree(const geometry::box < Point > &r)
: root(r, 1), element_count(0), node_size_(1)
{
}
+ /**
+ * \brief Creates a quadtree using r as bounding box and M as maximum
+ * number of elements per node.
+ */
quadtree(const geometry::box < Point > &r, const unsigned int M)
: root(r, M), element_count(0), node_size_(M)
{
}
+ /**
+ * \brief Creates a quadtree using r as bounding box and M as maximum
+ * number of elements per node (m is ignored).
+ */
quadtree(const geometry::box < Point > &r, const unsigned int m,
const unsigned int M)
: root(r, M), element_count(0), node_size_(M)
{
}
- /// remove the element with key 'k'
+
+ /**
+ * \brief Remove the element with key 'k'
+ */
void remove(const Point & k)
{
root.remove(k);
@@ -50,12 +64,19 @@
}
+ /**
+ * \brief Inserts a new element with key 'k' and value 'v'
+ */
void insert(const Point & k, const Value & v)
{
element_count++;
root.insert(k, v);
}
+
+ /**
+ * \brief Print Quadtree (mainly for debug)
+ */
void print(void)
{
std::cerr << "=================================" << std::endl;
@@ -65,6 +86,9 @@
}
+ /**
+ * \brief Insert all the elements in 'values' and 'points'
+ */
void bulk_insert(std::vector < Value > &values,
std::vector < Point > &points)
{
@@ -93,27 +117,42 @@
// std::cerr << " nsecs: " << xt2.nsec - xt1.nsec << std::endl;
}
+
+ /**
+ * \brief Search for 'k' in the QuadTree. If 'k' is in the Quadtree
+ * it returns its value, otherwise it returns Value()
+ */
Value find(const Point & k)
{
return root.find(k);
}
+
+ /**
+ * \brief Returns all the values inside 'r' in the Quadtree
+ */
std::deque < Value > find(const geometry::box < Point > &r) {
std::deque < Value > result;
root.find(result, r);
return result;
}
+ /**
+ * \brief Returns the number of elements.
+ */
unsigned int elements(void) const
{
return element_count;
}
private:
+ /// quadtree root
quadtree_node < Point, Value > root;
+
+ /// element count in the Quadtree
unsigned int element_count;
- // number of points in each node
+ /// number of points in each node
unsigned int node_size_;
};
Modified: sandbox/SOC/2008/spacial_indexing/boost/spatial_index/quadtree_node.hpp
==============================================================================
--- sandbox/SOC/2008/spacial_indexing/boost/spatial_index/quadtree_node.hpp (original)
+++ sandbox/SOC/2008/spacial_indexing/boost/spatial_index/quadtree_node.hpp 2008-07-28 14:27:50 EDT (Mon, 28 Jul 2008)
@@ -28,6 +28,10 @@
template < typename Point, typename Value > class quadtree_node
{
public:
+ /**
+ * \brief Creates a quadtree node, with 'r' as the bounding box
+ * and 'node_size' as the maximum number of nodes.
+ */
quadtree_node(const geometry::box < Point > &r,
const unsigned int node_size)
: bounding_rectangle_(r), node_size_(node_size)
@@ -35,6 +39,9 @@
}
+ /**
+ * \brief Retuns true if the leaf is empty (no elements and no children)
+ */
bool empty_leaf(void) const
{
return (m_.size() == 0) &&
@@ -44,6 +51,11 @@
(sw_ == boost::shared_ptr < quadtree_node > ());
}
+
+ /**
+ * \brief Inserts a new element in this node (if suitable) or in
+ * one of the children.
+ */
void insert(const Point & k, const Value & v)
{
if (m_.size() < node_size_) {
@@ -92,7 +104,9 @@
}
}
-
+ /**
+ * \brief Search for element inside 'r' in this node and its children.
+ */
void find(std::deque < Value > &result, const geometry::box < Point > &r)
{
if (m_.size() != 0) {
@@ -137,6 +151,9 @@
}
+ /**
+ * \brief Searchs for 'k' in this node or its children.
+ */
Value find(const Point & k)
{
typename std::map < Point, Value >::const_iterator it = m_.find(k);
@@ -147,6 +164,9 @@
}
+ /**
+ * \brief Recursive step of the search algorithm
+ */
Value recursive_search(const Point & k)
{
// IMP: maybe this could be done only one time at node creation
@@ -188,6 +208,10 @@
}
+ /**
+ * \brief Remove element with key 'k' from this ode or one of its
+ * children.
+ */
void remove(const Point & k)
{
typename std::map < Point, Value >::iterator it = m_.find(k);
@@ -198,7 +222,9 @@
recursive_remove(k);
}
-
+ /**
+ * \brief Recursive step of the remove algorithm
+ */
void recursive_remove(const Point & k)
{
// IMP: maybe this could be done only one time at node creation
@@ -254,6 +280,9 @@
}
+ /**
+ * \brief Print Quadtree (mainly for debug)
+ */
void print(void) const
{
std::cerr << "--------------------------------------" << std::endl;
Modified: sandbox/SOC/2008/spacial_indexing/boost/spatial_index/rtree.hpp
==============================================================================
--- sandbox/SOC/2008/spacial_indexing/boost/spatial_index/rtree.hpp (original)
+++ sandbox/SOC/2008/spacial_indexing/boost/spatial_index/rtree.hpp 2008-07-28 14:27:50 EDT (Mon, 28 Jul 2008)
@@ -27,6 +27,10 @@
template < typename Point, typename Value > class rtree
{
public:
+ /**
+ * \brief Creates a rtree with M maximum elements per node
+ * and m minimum.
+ */
rtree(const unsigned int &M, const unsigned int &m)
: element_count_(0), m_(m), M_(M),
root_(new rtree_node < Point,
@@ -34,6 +38,11 @@
{
}
+
+ /**
+ * \brief Creates a rtree with M maximum elements per node
+ * and m minimum (b is ignored).
+ */
rtree(const geometry::box < Point > &b, const unsigned int &M,
const unsigned int &m)
: element_count_(0), m_(m), M_(M), root_(
@@ -44,7 +53,9 @@
}
- /// remove the element with key 'k'
+ /**
+ * \brief Remove the element with key 'k'
+ */
void remove(const Point & k)
{
/// it's the same than removing a box of only one point
@@ -52,7 +63,9 @@
}
- /// remove elements inside the box 'k'
+ /**
+ * \brief Remove elements inside the box 'k'
+ */
void remove(const geometry::box < Point > &k)
{
try {
@@ -119,12 +132,18 @@
}
+ /**
+ * \brief Returns the number of elements.
+ */
unsigned int elements(void) const
{
return element_count_;
}
+ /**
+ * \brief Print Rtree (mainly for debug)
+ */
void print(void)
{
std::cerr << "===================================" << std::endl;
@@ -134,13 +153,20 @@
std::cerr << "===================================" << std::endl;
}
+
+ /**
+ * \brief Inserts a new element with key 'k' and value 'v'
+ */
void insert(const Point & k, const Value & v)
{
- // it's the same than inserting a box of only one point
+ // it's the same that inserting a box of only one point
this->insert(geometry::box < Point > (k, k), v);
}
+ /**
+ * \brief Inserts a new element with key 'e' and value 'v'
+ */
void insert(const geometry::box < Point > &e, const Value & v)
{
element_count_++;
@@ -167,6 +193,9 @@
}
+ /**
+ * \brief Insert all the elements in 'values' and 'points'
+ */
void bulk_insert(std::vector < Value > &values,
std::vector < Point > &points)
{
@@ -193,6 +222,10 @@
}
}
+ /**
+ * \brief Search for 'k' in the Rtree. If 'k' is found
+ * it returns its value, otherwise it returns Value()
+ */
Value find(const Point & k)
{
std::deque < Value > result;
@@ -206,14 +239,15 @@
}
+ /**
+ * \brief Returns all the values inside 'r'
+ */
std::deque < Value > find(const geometry::box < Point > &r) {
std::deque < Value > result;
root_->find(r, result, false);
return result;
}
-
-
private:
/// number of elements
unsigned int element_count_;
@@ -230,6 +264,10 @@
private:
+ /**
+ * \brief Reorganize the tree after a removal. It tries to
+ * join nodes with less elements than m.
+ */
void condense_tree(const boost::shared_ptr < rtree_node < Point,
Value > >&l, typename rtree_node < Point,
Value >::node_map & q_nodes)
@@ -266,6 +304,9 @@
}
+ /**
+ * \brief After an insertion splits nodes with more than M elements.
+ */
void adjust_tree(boost::shared_ptr < rtree_node < Point, Value > >&n)
{
if (n.get() == root_.get()) {
@@ -279,6 +320,10 @@
adjust_tree(parent);
}
+ /**
+ * \brief After an insertion splits nodes with more than M elements
+ * (recursive step with subtrees 'n1' and 'n2' to be joined).
+ */
void adjust_tree(boost::shared_ptr < rtree_node < Point, Value > >&l,
boost::shared_ptr < rtree_node < Point, Value > >&n1,
boost::shared_ptr < rtree_node < Point, Value > >&n2)
@@ -325,10 +370,13 @@
}
+ /**
+ * \brief Splits 'n' in 'n1' and 'n2'
+ */
void split_node(const boost::shared_ptr < rtree_node < Point, Value > >&n,
boost::shared_ptr < rtree_node < Point, Value > >&n1,
- boost::shared_ptr < rtree_node < Point,
- Value > >&n2) const
+ boost::shared_ptr < rtree_node < Point, Value > >&n2)
+ const
{
unsigned int seed1, seed2;
std::vector < geometry::box < Point > >boxes = n->get_boxes();
@@ -475,6 +523,9 @@
}
+ /**
+ * \brief Choose initial values for the split algorithm (linear version)
+ */
void linear_pick_seeds(const boost::shared_ptr < rtree_node < Point,
Value > >&n, unsigned int &seed1,
unsigned int &seed2) const
@@ -507,6 +558,10 @@
}
+ /**
+ * \brief Find distances between possible initial values for the
+ * pick_seeds algorithm.
+ */
template < unsigned int Dimension >
void find_normalized_separations(const std::vector < geometry::box <
Point > >&boxes, double &separation,
@@ -582,8 +637,11 @@
}
- boost::shared_ptr < rtree_node < Point,
- Value > >choose_corresponding_leaf(const geometry::box < Point > e)
+ /**
+ * \brief Choose one of the possible leaves to make an insertion
+ */
+ boost::shared_ptr < rtree_node < Point, Value > >
+ choose_corresponding_leaf(const geometry::box < Point > e)
{
boost::shared_ptr < rtree_node < Point, Value > >N = root_;
@@ -603,7 +661,9 @@
return N;
}
-
+ /**
+ * \brief Choose the exact leaf where an insertion should be done
+ */
boost::shared_ptr < rtree_node < Point,
Value > >choose_exact_leaf(const geometry::box < Point > &e) const
{
Modified: sandbox/SOC/2008/spacial_indexing/boost/spatial_index/rtree_leaf.hpp
==============================================================================
--- sandbox/SOC/2008/spacial_indexing/boost/spatial_index/rtree_leaf.hpp (original)
+++ sandbox/SOC/2008/spacial_indexing/boost/spatial_index/rtree_leaf.hpp 2008-07-28 14:27:50 EDT (Mon, 28 Jul 2008)
@@ -24,20 +24,33 @@
class rtree_leaf:public rtree_node < Point, Value >
{
public:
+ /// container type for the leaves
typedef std::vector < std::pair < geometry::box < Point >,
Value > >leaves_map;
public:
+ /**
+ * \brief Creates an empty leaf
+ */
rtree_leaf(void)
{
}
-
+
+
+ /**
+ * \brief Creates a new leaf, with 'parent' as parent
+ */
rtree_leaf(const boost::shared_ptr < rtree_node < Point, Value > >&parent)
: rtree_node < Point, Value > (parent, 0)
{
}
- /// query method
+
+ /**
+ * \brief Search for elements in 'e' in the Rtree. Add them to r.
+ * If exact_match is true only return the elements having as
+ * key the box 'e'. Otherwise return everything inside 'e'.
+ */
virtual void find(const geometry::box < Point > &e,
std::deque < Value > &r, const bool exact_match)
{
@@ -55,7 +68,10 @@
}
}
- /// compute bounding box for this leaf
+
+ /**
+ * \brief Compute bounding box for this leaf
+ */
virtual geometry::box < Point > compute_box(void) const
{
if (nodes_.empty())
@@ -72,29 +88,47 @@
return r;
}
- /// yes, we are a leaf
+
+ /**
+ * \brief True if we are a leaf
+ */
virtual bool is_leaf(void) const
{
return true;
}
- /// element count
+
+ /**
+ * \brief Number of elements in the tree
+ */
virtual unsigned int elements(void) const
{
return nodes_.size();
}
+
+ /**
+ * \brief Insert a new element, with key 'e' and value 'v'
+ */
virtual void insert(const geometry::box < Point > &e, const Value & v)
{
nodes_.push_back(std::make_pair(e, v));
}
- virtual std::vector < std::pair < geometry::box < Point >,
- Value > >get_leaves(void) const
+
+ /**
+ * \brief Proyect leaves of this node.
+ */
+ virtual std::vector < std::pair < geometry::box < Point >, Value > >
+ get_leaves(void) const
{
return nodes_;
}
+
+ /**
+ * \brief Add a new child (node) to this node
+ */
virtual void add_node(const geometry::box < Point > &b,
const boost::shared_ptr < rtree_node < Point,
Value > >&n)
@@ -102,24 +136,37 @@
throw std::logic_error("Can't add node to leaf node.");
}
+
+ /**
+ * \brief Add a new leaf to this node
+ */
virtual void add_value(const geometry::box < Point > &b, const Value & v)
{
nodes_.push_back(std::make_pair(b, v));
}
+
+ /**
+ * \brief Proyect value in position 'i' in the nodes container
+ */
virtual Value get_value(const unsigned int i) const
{
return nodes_[i].second;
}
- /// box projector for leaf
+
+ /**
+ * \brief Box projector for leaf
+ */
virtual geometry::box < Point > get_box(const unsigned int i) const
{
return nodes_[i].first;
}
- /// remove value with key 'k' in this leaf
+ /**
+ * \brief Remove value with key 'k' in this leaf
+ */
virtual void remove(const geometry::box < Point > &k)
{
@@ -134,6 +181,9 @@
}
+ /**
+ * \brief Proyect boxes from this node
+ */
virtual std::vector < geometry::box < Point > >get_boxes(void) const
{
std::vector < geometry::box < Point > >r;
@@ -144,6 +194,10 @@
return r;
}
+
+ /**
+ * \brief Print leaf (mainly for debug)
+ */
virtual void print(void) const
{
std::cerr << "\t" << " --> Leaf --------" << std::endl;
@@ -167,6 +221,7 @@
}
private:
+ /// leaves of this node
leaves_map nodes_;
};
Modified: sandbox/SOC/2008/spacial_indexing/boost/spatial_index/rtree_node.hpp
==============================================================================
--- sandbox/SOC/2008/spacial_indexing/boost/spatial_index/rtree_node.hpp (original)
+++ sandbox/SOC/2008/spacial_indexing/boost/spatial_index/rtree_node.hpp 2008-07-28 14:27:50 EDT (Mon, 28 Jul 2008)
@@ -20,6 +20,7 @@
namespace spatial_index
{
+ /// forward declaration
template < typename Point, typename Value > class rtree_leaf;
template < typename Point, typename Value > class rtree_node
@@ -30,31 +31,42 @@
boost::shared_ptr < rtree_node < Point, Value > > > > node_map;
public:
- /// default constructor (needed for the containers)
+ /**
+ * \brief Creates a default node (needed for the containers)
+ */
rtree_node(void)
{
}
- /// standard constructor
+ /**
+ * \brief Creates a node with 'parent' as parent and 'level' as its level
+ */
rtree_node(const boost::shared_ptr < rtree_node < Point, Value > >&parent,
const unsigned int &level)
: parent_(parent), level_(level)
{
}
- /// level projector
+ /**
+ * \brief Level projector
+ */
virtual unsigned int get_level(void) const
{
return level_;
}
- /// element count
+ /**
+ * \brief Number of elements in the subtree
+ */
virtual unsigned int elements(void) const
{
return nodes_.size();
}
- /// first element, to replace root in case of condensing
+
+ /**
+ * \brief Project first element, to replace root in case of condensing
+ */
boost::shared_ptr < rtree_node < Point, Value > >first_element(void) const
{
if (nodes_.size() == 0) {
@@ -63,20 +75,31 @@
return nodes_.begin()->second;
}
- /// true if it is a leaf node
+
+ /**
+ * \brief True if it is a leaf node
+ */
virtual bool is_leaf(void) const
{
return false;
}
- /// get a node
- boost::shared_ptr < rtree_node < Point,
- Value > >get_node(const unsigned int i)
+
+ /**
+ * \brief Proyector for the 'i' node
+ */
+ boost::shared_ptr < rtree_node < Point, Value > >
+ get_node(const unsigned int i)
{
return nodes_[i].second;
}
- /// query method
+
+ /**
+ * \brief Search for elements in 'e' in the Rtree. Add them to r.
+ * If exact_match is true only return the elements having as
+ * key the box 'e'. Otherwise return everything inside 'e'.
+ */
virtual void find(const geometry::box < Point > &e,
std::deque < Value > &r, const bool exact_match)
{
@@ -88,6 +111,10 @@
}
}
+
+ /**
+ * \brief Return in 'result' all the leaves inside 'e'
+ */
void find_leaves(const geometry::box < Point > &e,
typename std::vector < boost::shared_ptr < rtree_node <
Point, Value > > > &result) const
@@ -105,7 +132,10 @@
}
}
- /// compute bounding box for this leaf
+
+ /**
+ * \brief Compute bounding box for this node
+ */
virtual geometry::box < Point > compute_box(void) const
{
if (nodes_.empty()) {
@@ -121,13 +151,19 @@
return r;
}
- /// insert a value (not allowed for a node)
+
+ /**
+ * \brief Insert a value (not allowed for a node, only on leaves)
+ */
virtual void insert(const geometry::box < Point > &e, const Value & v)
{
throw std::logic_error("Insert in node!");
}
- /// get the envelopes of a node
+
+ /**
+ * \brief Get the envelopes of a node
+ */
virtual std::vector < geometry::box < Point > >get_boxes(void) const
{
std::vector < geometry::box < Point > >r;
@@ -138,7 +174,10 @@
return r;
}
- /// recompute the box
+
+ /**
+ * \brief Recompute the bounding box
+ */
void adjust_box(const boost::shared_ptr < rtree_node < Point, Value > >&n)
{
unsigned int index = 0;
@@ -151,6 +190,10 @@
}
}
+
+ /**
+ * \brief Remove elements inside the box 'k'
+ */
virtual void remove(const geometry::box < Point > &k)
{
for(typename node_map::iterator it = nodes_.begin();
@@ -162,7 +205,10 @@
}
}
- /// replace the node in the nodes_ vector and recompute the box
+
+ /**
+ * \brief Replace the node in the nodes_ vector and recompute the box
+ */
void replace_node(const boost::shared_ptr < rtree_node < Point,
Value > >&l, boost::shared_ptr < rtree_node < Point,
Value > >&new_l)
@@ -179,7 +225,10 @@
throw std::logic_error("Node not found.");
}
- /// add a node
+
+ /**
+ * \brief Add a child to this node
+ */
virtual void add_node(const geometry::box < Point > &b,
const boost::shared_ptr < rtree_node < Point,
Value > >&n)
@@ -188,13 +237,19 @@
n->update_parent(n);
}
- /// add a value (not allowed in nodes)
+
+ /**
+ * \brief add a value (not allowed in nodes, only on leaves)
+ */
virtual void add_value(const geometry::box < Point > &b, const Value & v)
{
throw std::logic_error("Can't add value to non-leaf node.");
}
- ///
+
+ /**
+ * \brief Add a child leaf to this node
+ */
void add_leaf_node(const geometry::box < Point > &b,
const boost::shared_ptr < rtree_leaf < Point,
Value > >&l)
@@ -202,7 +257,10 @@
nodes_.push_back(std::make_pair(b, l));
}
- /// insertion algorithm choose node
+
+ /**
+ * \brief Choose a node suitable for adding 'e'
+ */
boost::shared_ptr < rtree_node < Point, Value > >
choose_node(const geometry::box < Point > e)
{
@@ -250,19 +308,28 @@
return chosen_node;
}
- /// empty the node
+
+ /**
+ * \brief Empty the node
+ */
virtual void empty_nodes(void)
{
nodes_.clear();
}
- /// projector for parent
+
+ /**
+ * \brief Projector for parent
+ */
boost::shared_ptr < rtree_node < Point, Value > >get_parent(void) const
{
return parent_;
}
- /// update the parent of all the childs
+
+ /**
+ * \brief Update the parent of all the childs
+ */
void update_parent(const boost::shared_ptr < rtree_node < Point,
Value > >&p)
{
@@ -272,25 +339,36 @@
}
}
- /// set parent
+
+ /**
+ * \brief Set parent
+ */
void set_parent(const boost::shared_ptr < rtree_node < Point, Value > >&p)
{
parent_ = p;
}
- /// value projector for leaf_node (not allowed here)
+
+ /**
+ * \brief Value projector for leaf_node (not allowed for non-leaf nodes)
+ */
virtual Value get_value(const unsigned int i) const
{
throw std::logic_error("No values in a non-leaf node.");
}
- /// box projector for node
+ /**
+ * \brief Box projector for node 'i'
+ */
virtual geometry::box < Point > get_box(const unsigned int i) const
{
return nodes_[i].first;
}
- /// box projector for node
+
+ /**
+ * \brief Box projector for node pointed by 'l'
+ */
virtual geometry::box < Point > get_box(const boost::shared_ptr <
rtree_node < Point,
Value > >&l) const
@@ -305,16 +383,21 @@
throw std::logic_error("Node not found");
}
- /// value projector for the nodes
+
+ /**
+ * \brief Children projector
+ */
node_map get_nodes(void) const
{
return nodes_;
}
- /// get leaves for a node
- virtual std::vector < std::pair < geometry::box < Point >,
- Value > >get_leaves(void) const
+ /**
+ * \brief Get leaves for a node
+ */
+ virtual std::vector < std::pair < geometry::box < Point >, Value > >
+ get_leaves(void) const
{
std::vector < std::pair < geometry::box < Point >, Value > >l;
@@ -338,7 +421,10 @@
return l;
}
- /// print node
+
+ /**
+ * \brief Print Rtree subtree (mainly for debug)
+ */
virtual void print(void) const
{
std::cerr << " --> Node --------" << std::endl;
@@ -374,17 +460,19 @@
}
}
- /// destructor (virtual because we have virtual functions)
+ /**
+ * \brief destructor (virtual because we have virtual functions)
+ */
virtual ~ rtree_node(void)
{
}
private:
- // parent node
+ /// parent node
boost::shared_ptr < rtree_node < Point, Value > >parent_;
- // level of this node
+ /// level of this node
unsigned int level_;
/// child nodes
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk