[mlpack-git] master: Add deprecated flags (fd14441)

gitdub at mlpack.org gitdub at mlpack.org
Tue Aug 23 15:58:25 EDT 2016


Repository : https://github.com/mlpack/mlpack
On branch  : master
Link       : https://github.com/mlpack/mlpack/compare/1148f1652e139c9037eb3813550090313d089a30...a8a8a1381b529a01420de6e792a4a1e7bd58a626

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

commit fd144410f822e73fde490bc39218799b43aeca06
Author: MarcosPividori <marcos.pividori at gmail.com>
Date:   Tue Aug 23 14:51:51 2016 -0300

    Add deprecated flags


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

fd144410f822e73fde490bc39218799b43aeca06
 .../methods/neighbor_search/neighbor_search.hpp    | 63 ++++++++++++----------
 1 file changed, 35 insertions(+), 28 deletions(-)

diff --git a/src/mlpack/methods/neighbor_search/neighbor_search.hpp b/src/mlpack/methods/neighbor_search/neighbor_search.hpp
index b66678e..c0a40c5 100644
--- a/src/mlpack/methods/neighbor_search/neighbor_search.hpp
+++ b/src/mlpack/methods/neighbor_search/neighbor_search.hpp
@@ -194,11 +194,11 @@ class NeighborSearch
    * @param epsilon Relative approximate error (non-negative).
    * @param metric An optional instance of the MetricType class.
    */
-  NeighborSearch(const MatType& referenceSet,
-                 const bool naive,
-                 const bool singleMode = false,
-                 const double epsilon = 0,
-                 const MetricType metric = MetricType());
+  mlpack_deprecated NeighborSearch(const MatType& referenceSet,
+                                   const bool naive,
+                                   const bool singleMode = false,
+                                   const double epsilon = 0,
+                                   const MetricType metric = MetricType());
 
   /**
    * Initialize the NeighborSearch object, taking ownership of the reference
@@ -222,11 +222,11 @@ class NeighborSearch
    * @param epsilon Relative approximate error (non-negative).
    * @param metric An optional instance of the MetricType class.
    */
-  NeighborSearch(MatType&& referenceSet,
-                 const bool naive,
-                 const bool singleMode = false,
-                 const double epsilon = 0,
-                 const MetricType metric = MetricType());
+  mlpack_deprecated NeighborSearch(MatType&& referenceSet,
+                                   const bool naive,
+                                   const bool singleMode = false,
+                                   const double epsilon = 0,
+                                   const MetricType metric = MetricType());
 
   /**
    * Initialize the NeighborSearch object with a copy of the given
@@ -236,6 +236,8 @@ class NeighborSearch
    * instantiated distance metric can be given, for cases where the distance
    * metric holds data.
    *
+   * Deprecated. Will be removed in mlpack 3.0.0.
+   *
    * This method will copy the given tree.  You can avoid this copy by using the
    * construct that takes a rvalue reference to the tree.
    *
@@ -252,10 +254,10 @@ class NeighborSearch
    * @param epsilon Relative approximate error (non-negative).
    * @param metric Instantiated distance metric.
    */
-  NeighborSearch(Tree& referenceTree,
-                 const bool singleMode = false,
-                 const double epsilon = 0,
-                 const MetricType metric = MetricType());
+  mlpack_deprecated NeighborSearch(Tree& referenceTree,
+                                   const bool singleMode = false,
+                                   const double epsilon = 0,
+                                   const MetricType metric = MetricType());
 
   /**
    * Initialize the NeighborSearch object with the given pre-constructed
@@ -298,6 +300,8 @@ class NeighborSearch
    * distance metric can be given, for cases where the distance metric holds
    * data.
    *
+   * Deprecated. Will be removed in mlpack 3.0.0.
+   *
    * This method will take ownership of the given tree. There is no copying of
    * the data matrices (because tree-building is not necessary), so this is the
    * constructor to use when copies absolutely must be avoided.
@@ -315,10 +319,10 @@ class NeighborSearch
    * @param epsilon Relative approximate error (non-negative).
    * @param metric Instantiated distance metric.
    */
-  NeighborSearch(Tree&& referenceTree,
-                 const bool singleMode = false,
-                 const double epsilon = 0,
-                 const MetricType metric = MetricType());
+  mlpack_deprecated NeighborSearch(Tree&& referenceTree,
+                                   const bool singleMode = false,
+                                   const double epsilon = 0,
+                                   const MetricType metric = MetricType());
 
   /**
    * Create a NeighborSearch object without any reference data.  If Search() is
@@ -333,10 +337,10 @@ class NeighborSearch
    * @param epsilon Relative approximate error (non-negative).
    * @param metric Instantiated metric.
    */
-  NeighborSearch(const bool naive,
-                 const bool singleMode = false,
-                 const double epsilon = 0,
-                 const MetricType metric = MetricType());
+  mlpack_deprecated NeighborSearch(const bool naive,
+                                   const bool singleMode = false,
+                                   const double epsilon = 0,
+                                   const MetricType metric = MetricType());
 
 
   /**
@@ -500,22 +504,25 @@ class NeighborSearch
   size_t Scores() const { return scores; }
 
   //! Access whether or not search is done in naive linear scan mode.
-  bool Naive() const { return naive; }
+  //! Deprecated. Will be removed in mlpack 3.0.0.
+  mlpack_deprecated bool Naive() const { return naive; }
   //! Modify whether or not search is done in naive linear scan mode.
   //! Deprecated. Will be removed in mlpack 3.0.0.
-  bool& Naive() { return naive; }
+  mlpack_deprecated bool& Naive() { return naive; }
 
   //! Access whether or not search is done in single-tree mode.
-  bool SingleMode() const { return singleMode; }
+  //! Deprecated. Will be removed in mlpack 3.0.0.
+  mlpack_deprecated bool SingleMode() const { return singleMode; }
   //! Modify whether or not search is done in single-tree mode.
   //! Deprecated. Will be removed in mlpack 3.0.0.
-  bool& SingleMode() { return singleMode; }
+  mlpack_deprecated bool& SingleMode() { return singleMode; }
 
   //! Access whether or not search is done in greedy mode.
-  bool Greedy() const { return greedy; }
+  //! Deprecated. Will be removed in mlpack 3.0.0.
+  mlpack_deprecated bool Greedy() const { return greedy; }
   //! Modify whether or not search is done in greedy mode.
   //! Deprecated. Will be removed in mlpack 3.0.0.
-  bool& Greedy() { return greedy; }
+  mlpack_deprecated bool& Greedy() { return greedy; }
 
   //! Access the relative error to be considered in approximate search.
   double Epsilon() const { return epsilon; }




More information about the mlpack-git mailing list