[mlpack] 188/207: mlpack_deprecated is lowercase... why did this compile before this change?

Barak A. Pearlmutter barak+git at pearlmutter.net
Thu Mar 23 17:53:53 UTC 2017


This is an automated email from the git hooks/post-receive script.

bap pushed a commit to branch master
in repository mlpack.

commit 154707797decacb1cf14dc69983139f8ea352be4
Author: Ryan Curtin <ryan at ratml.org>
Date:   Fri Mar 17 14:57:09 2017 -0400

    mlpack_deprecated is lowercase... why did this compile before this change?
---
 src/mlpack/methods/logistic_regression/logistic_regression.hpp | 6 +++---
 src/mlpack/methods/softmax_regression/softmax_regression.hpp   | 3 ++-
 src/mlpack/prereqs.hpp                                         | 5 ++++-
 3 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/src/mlpack/methods/logistic_regression/logistic_regression.hpp b/src/mlpack/methods/logistic_regression/logistic_regression.hpp
index e249ad7..8dc0bc0 100644
--- a/src/mlpack/methods/logistic_regression/logistic_regression.hpp
+++ b/src/mlpack/methods/logistic_regression/logistic_regression.hpp
@@ -163,9 +163,9 @@ class LogisticRegression
    * @param responses Vector to put output predictions of responses into.
    * @param decisionBoundary Decision boundary (default 0.5).
    */
-  void Predict(const MatType& predictors,
-               arma::Row<size_t>& responses,
-               const double decisionBoundary = 0.5) const;
+  mlpack_deprecated void Predict(const MatType& predictors,
+                                 arma::Row<size_t>& responses,
+                                 const double decisionBoundary = 0.5) const;
 
   /**
    * Classify the given point.  The predicted label is returned.  Optionally,
diff --git a/src/mlpack/methods/softmax_regression/softmax_regression.hpp b/src/mlpack/methods/softmax_regression/softmax_regression.hpp
index 1262634..5846959 100644
--- a/src/mlpack/methods/softmax_regression/softmax_regression.hpp
+++ b/src/mlpack/methods/softmax_regression/softmax_regression.hpp
@@ -119,7 +119,8 @@ class SoftmaxRegression
    * @param testData Matrix of data points for which predictions are to be made.
    * @param predictions Vector to store the predictions in.
    */
-  void Predict(const arma::mat& testData, arma::Row<size_t>& predictions) const;
+  mlpack_deprecated void Predict(const arma::mat& testData,
+                                 arma::Row<size_t>& predictions) const;
 
   /**
    * Classify the given points, returning the predicted labels for each point.
diff --git a/src/mlpack/prereqs.hpp b/src/mlpack/prereqs.hpp
index 5466bb8..c66ff78 100644
--- a/src/mlpack/prereqs.hpp
+++ b/src/mlpack/prereqs.hpp
@@ -83,7 +83,7 @@
 // defines.
 #include <mlpack/core/util/arma_config_check.hpp>
 
-// All code should have access to logging
+// All code should have access to logging.
 #include <mlpack/core/util/log.hpp>
 #include <mlpack/core/util/timers.hpp>
 #include <mlpack/core/util/deprecated.hpp>
@@ -96,4 +96,7 @@
   #define ARMA_USE_CXX11
 #endif
 
+// We need to be able to mark functions deprecated.
+#include <mlpack/core/util/deprecated.hpp>
+
 #endif

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/mlpack.git



More information about the debian-science-commits mailing list