Changeset 21:c6c1dda3d2e0 in rrlib_geometry for space_partitioning/tKDTree.h


Ignore:
Timestamp:
09.01.2012 16:12:12 (8 years ago)
Author:
Tobias Föhst <foehst@…>
Branch:
default
Phase:
public
Message:

Some renaming and the default metric is now accessible via cDEFAULT_METRIC

File:
1 edited

Legend:

Unmodified
Added
Removed
  • space_partitioning/tKDTree.h

    r20 r21  
    146146 
    147147  typedef geometry::tPoint<Tdimension, TElement> tPoint; 
    148   typedef geometry::tBoundingBox<Tdimension, TElement> tBoundingBox; 
    149148  typedef std::function < TElement(const tPoint &, const tPoint &) > tMetric; 
     149 
     150  static const tMetric cDEFAULT_METRIC; 
    150151 
    151152  /*! 
     
    168169  public: 
    169170 
     171    typedef geometry::tBoundingBox<Tdimension, TElement> tBoundingBox; 
     172 
    170173    /*! 
    171174     * \brief The ctor of tNode 
     
    176179     * as its own children until only single points are left. 
    177180     * 
    178      * \param begin    An indirect iterator to the begin of the data to manage 
    179      * \param end      An indirect iterator to the end of the data to manage 
    180      * \param metric   A functor that computes an appropriate metric 
     181     * \param points_begin   An indirect iterator to the begin of the data to manage 
     182     * \param points_end     An indirect iterator to the end of the data to manage 
     183     * \param metric         A functor that computes an appropriate metric 
    181184     */ 
    182185    template <typename TIterator> 
    183     tNode(TIterator begin, TIterator end, tMetric metric); 
     186    tNode(TIterator points_begin, TIterator points_end, tMetric metric); 
    184187 
    185188    /*! 
     
    217220 
    218221    /*! 
    219      * \brief Get the axis-aligned boungind box of the points underneath this node 
     222     * \brief Get the axis-aligned bounging box of the points underneath this node 
    220223     * 
    221224     * \return The maximum coordinates of this node 
     
    282285   */ 
    283286  template <typename TIterator> 
    284   tKDTree(TIterator begin, TIterator end); 
    285  
    286   template <typename TIterator> 
    287   tKDTree(TIterator begin, TIterator end, tMetric metric); 
     287  tKDTree(TIterator points_begin, TIterator points_end, tMetric metric = cDEFAULT_METRIC); 
     288// 
     289//  template <typename TIterator> 
     290//  tKDTree(TIterator begin, TIterator end, tMetric metric); 
    288291 
    289292  /*! 
Note: See TracChangeset for help on using the changeset viewer.