[mlpack-git] master, mlpack-1.0.x: Remove PeriodicHRectBound (#30). (172a350)

gitdub at big.cc.gt.atl.ga.us gitdub at big.cc.gt.atl.ga.us
Thu Mar 5 21:43:18 EST 2015


Repository : https://github.com/mlpack/mlpack

On branches: master,mlpack-1.0.x
Link       : https://github.com/mlpack/mlpack/compare/904762495c039e345beba14c1142fd719b3bd50e...f94823c800ad6f7266995c700b1b630d5ffdcf40

>---------------------------------------------------------------

commit 172a350a215bf4e99960b742541c3e659222b656
Author: Ryan Curtin <ryan at ratml.org>
Date:   Mon Feb 10 15:07:51 2014 +0000

    Remove PeriodicHRectBound (#30).


>---------------------------------------------------------------

172a350a215bf4e99960b742541c3e659222b656
 src/mlpack/core/tree/CMakeLists.txt         |   2 -
 src/mlpack/core/tree/bounds.hpp             |   1 -
 src/mlpack/core/tree/periodichrectbound.hpp | 150 ----------------------------
 3 files changed, 153 deletions(-)

diff --git a/src/mlpack/core/tree/CMakeLists.txt b/src/mlpack/core/tree/CMakeLists.txt
index 3ca4469..a587f82 100644
--- a/src/mlpack/core/tree/CMakeLists.txt
+++ b/src/mlpack/core/tree/CMakeLists.txt
@@ -28,8 +28,6 @@ set(SOURCES
   mrkd_statistic.hpp
   mrkd_statistic_impl.hpp
   mrkd_statistic.cpp
-  periodichrectbound.hpp
-  periodichrectbound_impl.hpp
   statistic.hpp
   traversal_info.hpp
   tree_traits.hpp
diff --git a/src/mlpack/core/tree/bounds.hpp b/src/mlpack/core/tree/bounds.hpp
index 262c582..bd1de8c 100644
--- a/src/mlpack/core/tree/bounds.hpp
+++ b/src/mlpack/core/tree/bounds.hpp
@@ -11,7 +11,6 @@
 #include <mlpack/core/metrics/lmetric.hpp>
 
 #include "hrectbound.hpp"
-#include "periodichrectbound.hpp"
 #include "ballbound.hpp"
 
 #endif // __MLPACK_CORE_TREE_BOUNDS_HPP
diff --git a/src/mlpack/core/tree/periodichrectbound.hpp b/src/mlpack/core/tree/periodichrectbound.hpp
deleted file mode 100644
index b61fafe..0000000
--- a/src/mlpack/core/tree/periodichrectbound.hpp
+++ /dev/null
@@ -1,150 +0,0 @@
-/**
- * @file periodichrectbound.hpp
- *
- * Bounds that are useful for binary space partitioning trees.
- *
- * This file describes the interface for the PeriodicHRectBound policy, which
- * implements a hyperrectangle bound in a periodic space.
- */
-#ifndef __MLPACK_CORE_TREE_PERIODICHRECTBOUND_HPP
-#define __MLPACK_CORE_TREE_PERIODICHRECTBOUND_HPP
-
-#include <mlpack/core.hpp>
-
-namespace mlpack {
-namespace bound {
-
-/**
- * Hyper-rectangle bound for an L-metric.
- *
- * Template parameter t_pow is the metric to use; use 2 for Euclidean (L2).
- */
-template<int t_pow = 2>
-class PeriodicHRectBound
-{
- public:
-  /**
-   * Empty constructor.
-   */
-  PeriodicHRectBound();
-
-  /**
-   * Specifies the box size.  The dimensionality is set to the same of the box
-   * size, and the bounds are initialized to be empty.
-   */
-  PeriodicHRectBound(arma::vec box);
-
-  /***
-   * Copy constructor and copy operator.  These are necessary because we do our
-   * own memory management.
-   */
-  PeriodicHRectBound(const PeriodicHRectBound& other);
-  PeriodicHRectBound& operator=(const PeriodicHRectBound& other);
-
-  /**
-   * Destructor: clean up memory.
-   */
-  ~PeriodicHRectBound();
-
-  /**
-   * Modifies the box to the desired dimenstions.
-   */
-  void SetBoxSize(arma::vec box);
-
-  /**
-   * Returns the box vector.
-   */
-  const arma::vec& Box() const { return box; }
-
-  /**
-   * Resets all dimensions to the empty set.
-   */
-  void Clear();
-
-  /** Gets the dimensionality */
-  size_t Dim() const { return dim; }
-
-  /**
-   * Sets and gets the range for a particular dimension.
-   */
-  math::Range& operator[](size_t i);
-  const math::Range operator[](size_t i) const;
-
-  /***
-   * Calculates the centroid of the range.  This does not factor in periodic
-   * coordinates, so the centroid may not necessarily be inside the given box.
-   *
-   * @param centroid Vector to write the centroid to.
-   */
-  void Centroid(arma::vec& centroid) const;
-
-  /**
-   * Calculates minimum bound-to-point squared distance in the periodic bound
-   * case.
-   */
-  double MinDistance(const arma::vec& point) const;
-
-  /**
-   * Calculates minimum bound-to-bound squared distance in the periodic bound
-   * case.
-   *
-   * Example: bound1.MinDistance(other) for minimum squared distance.
-   */
-  double MinDistance(const PeriodicHRectBound& other) const;
-
-  /**
-   * Calculates maximum bound-to-point squared distance in the periodic bound
-   * case.
-   */
-  double MaxDistance(const arma::vec& point) const;
-
-  /**
-   * Computes maximum bound-to-bound squared distance in the periodic bound
-   * case.
-   */
-  double MaxDistance(const PeriodicHRectBound& other) const;
-
-  /**
-   * Calculates minimum and maximum bound-to-point squared distance in the
-   * periodic bound case.
-   */
-  math::Range RangeDistance(const arma::vec& point) const;
-
-  /**
-   * Calculates minimum and maximum bound-to-bound squared distance in the
-   * periodic bound case.
-   */
-  math::Range RangeDistance(const PeriodicHRectBound& other) const;
-
-  /**
-   * Expands this region to include a new point.
-   */
-  PeriodicHRectBound& operator|=(const arma::vec& vector);
-
-  /**
-   * Expands this region to encompass another bound.
-   */
-  PeriodicHRectBound& operator|=(const PeriodicHRectBound& other);
-
-  /**
-   * Determines if a point is within this bound.
-   */
-  bool Contains(const arma::vec& point) const;
-
-  /**
-   * Returns a string representation of an object.
-   */
-  std::string ToString() const;
-
- private:
-  math::Range *bounds;
-  size_t dim;
-  arma::vec box;
-};
-
-}; // namespace bound
-}; // namespace mlpack
-
-#include "periodichrectbound_impl.hpp"
-
-#endif // __MLPACK_CORE_TREE_PERIODICHRECTBOUND_HPP



More information about the mlpack-git mailing list