/** * \file KMCentersNode.h \brief leaf node of the kc-tree * * Copyright 2007-2013 IMP Inventors. All rights reserved. * */ #ifndef IMPSTATISTICS_INTERNAL_KM_CENTERS_NODE_LEAF_H #define IMPSTATISTICS_INTERNAL_KM_CENTERS_NODE_LEAF_H #include "KMCentersNode.h" #include "KMData.h" #include "KMRectangle.h" #include "IMP/log.h" IMPSTATISTICS_BEGIN_INTERNAL_NAMESPACE #ifndef IMP_DOXYGEN /** Leaf nodes of the kc-tree store the set of points associated with this bucket, stored as an array of point indices. These are indices in the array points, which resides with the root of the kc-tree. We also store the number of points that reside in this bucket. \unstable {KMCentersNodeLeaf} */ class IMPSTATISTICSEXPORT KMCentersNodeLeaf: public KMCentersNode { public: KMCentersNodeLeaf(){} //! Constractor /** \param[in] bb the bounding rectangle of the points that are associated with the node \param[in] centers a pointer to all of the centers \param[in] data_inds indexes of data points that are associated with the node \param[in] \param[in] */ KMCentersNodeLeaf(int level,const KMRectangle &bb, KMCenters *centers, const Ints &data_inds) : KMCentersNode(bb,centers,level) { IMP_LOG_VERBOSE( "add a new center node leaf with " << data_inds.size() << " points" <=1, "a leaf node should contain at least one point"); for (unsigned int i=0;i