[mlpack-svn] r11130 - in mlpack/trunk/src/mlpack: core/optimizers/aug_lagrangian core/tree methods/emst methods/kernel_pca methods/kmeans methods/neighbor_search tests

fastlab-svn at coffeetalk-1.cc.gatech.edu fastlab-svn at coffeetalk-1.cc.gatech.edu
Tue Jan 17 16:11:48 EST 2012


Author: jcline3
Date: 2012-01-17 16:11:47 -0500 (Tue, 17 Jan 2012)
New Revision: 11130

Modified:
   mlpack/trunk/src/mlpack/core/optimizers/aug_lagrangian/aug_lagrangian_test_functions.cpp
   mlpack/trunk/src/mlpack/core/optimizers/aug_lagrangian/aug_lagrangian_test_functions.hpp
   mlpack/trunk/src/mlpack/core/tree/statistic.hpp
   mlpack/trunk/src/mlpack/methods/emst/dtb_impl.hpp
   mlpack/trunk/src/mlpack/methods/kernel_pca/kernel_pca_main.cpp
   mlpack/trunk/src/mlpack/methods/kmeans/allow_empty_clusters.hpp
   mlpack/trunk/src/mlpack/methods/neighbor_search/neighbor_search.hpp
   mlpack/trunk/src/mlpack/tests/tree_test.cpp
Log:
How many unused parameters does one library need...

Just commenting out the unused variable names so that the code
is still readable and sensible. I'm not sure if having several
methods that don't do anything at all is a completely sensible
approach, though...


Modified: mlpack/trunk/src/mlpack/core/optimizers/aug_lagrangian/aug_lagrangian_test_functions.cpp
===================================================================
--- mlpack/trunk/src/mlpack/core/optimizers/aug_lagrangian/aug_lagrangian_test_functions.cpp	2012-01-17 20:31:20 UTC (rev 11129)
+++ mlpack/trunk/src/mlpack/core/optimizers/aug_lagrangian/aug_lagrangian_test_functions.cpp	2012-01-17 21:11:47 UTC (rev 11130)
@@ -57,7 +57,7 @@
 }
 
 void AugLagrangianTestFunction::GradientConstraint(size_t index,
-    const arma::mat& coordinates, arma::mat& gradient)
+    arma::mat& gradient)
 {
   // If the user passed an invalid index (not 0), we will return a zero
   // gradient.

Modified: mlpack/trunk/src/mlpack/core/optimizers/aug_lagrangian/aug_lagrangian_test_functions.hpp
===================================================================
--- mlpack/trunk/src/mlpack/core/optimizers/aug_lagrangian/aug_lagrangian_test_functions.hpp	2012-01-17 20:31:20 UTC (rev 11129)
+++ mlpack/trunk/src/mlpack/core/optimizers/aug_lagrangian/aug_lagrangian_test_functions.hpp	2012-01-17 21:11:47 UTC (rev 11130)
@@ -32,9 +32,7 @@
   size_t NumConstraints() const { return 1; }
 
   double EvaluateConstraint(size_t index, const arma::mat& coordinates);
-  void GradientConstraint(size_t index,
-                          const arma::mat& coordinates,
-                          arma::mat& gradient);
+  void GradientConstraint(size_t index, arma::mat& gradient);
 
   const arma::mat& GetInitialPoint() { return initialPoint; }
 

Modified: mlpack/trunk/src/mlpack/core/tree/statistic.hpp
===================================================================
--- mlpack/trunk/src/mlpack/core/tree/statistic.hpp	2012-01-17 20:31:20 UTC (rev 11129)
+++ mlpack/trunk/src/mlpack/core/tree/statistic.hpp	2012-01-17 21:11:47 UTC (rev 11130)
@@ -30,9 +30,9 @@
      * @param count Number of points held in this leaf.
      */
     template<typename MatType>
-    EmptyStatistic(const MatType& dataset,
-                   const size_t begin,
-                   const size_t count)
+    EmptyStatistic(const MatType& /* dataset */,
+                   const size_t /* begin */,
+                   const size_t /* count */)
     { }
 
     /**
@@ -46,11 +46,11 @@
      * @param rightStat EmptyStatistic object of the right child node.
      */
     template<typename MatType>
-    EmptyStatistic(const MatType& dataset,
-                   const size_t start,
-                   const size_t count,
-                   const EmptyStatistic& leftStat,
-                   const EmptyStatistic& rightStat)
+    EmptyStatistic(const MatType& /* dataset */,
+                   const size_t /* start */,
+                   const size_t /* count */,
+                   const EmptyStatistic& /* leftStat */,
+                   const EmptyStatistic& /* rightStat */)
     { }
 };
 

Modified: mlpack/trunk/src/mlpack/methods/emst/dtb_impl.hpp
===================================================================
--- mlpack/trunk/src/mlpack/methods/emst/dtb_impl.hpp	2012-01-17 20:31:20 UTC (rev 11129)
+++ mlpack/trunk/src/mlpack/methods/emst/dtb_impl.hpp	2012-01-17 21:11:47 UTC (rev 11130)
@@ -27,7 +27,7 @@
  * An initializer for leaves.
  */
 template<typename MatType>
-DTBStat::DTBStat(const MatType& dataset,
+DTBStat::DTBStat(const MatType& /* dataset */,
                  const size_t start,
                  const size_t count) :
     maxNeighborDistance(DBL_MAX),
@@ -40,11 +40,11 @@
  * An initializer for non-leaves.
  */
 template<typename MatType>
-DTBStat::DTBStat(const MatType& dataset,
+DTBStat::DTBStat(const MatType& /* dataset */,
                  const size_t start,
                  const size_t count,
-                 const DTBStat& leftStat,
-                 const DTBStat& right_stat) :
+                 const DTBStat& /* leftStat */,
+                 const DTBStat& /* rightStat */) :
     maxNeighborDistance(DBL_MAX),
     componentMembership((count == 1) ? start : -1)
 {

Modified: mlpack/trunk/src/mlpack/methods/kernel_pca/kernel_pca_main.cpp
===================================================================
--- mlpack/trunk/src/mlpack/methods/kernel_pca/kernel_pca_main.cpp	2012-01-17 20:31:20 UTC (rev 11129)
+++ mlpack/trunk/src/mlpack/methods/kernel_pca/kernel_pca_main.cpp	2012-01-17 21:11:47 UTC (rev 11130)
@@ -14,7 +14,7 @@
 using namespace std;
 using namespace arma;
 
-int main(int argc, char** argv)
+int main(int /* argc */, char** /* argv */)
 {
 
   mat data("1 0 2 3 9;"

Modified: mlpack/trunk/src/mlpack/methods/kmeans/allow_empty_clusters.hpp
===================================================================
--- mlpack/trunk/src/mlpack/methods/kmeans/allow_empty_clusters.hpp	2012-01-17 20:31:20 UTC (rev 11129)
+++ mlpack/trunk/src/mlpack/methods/kmeans/allow_empty_clusters.hpp	2012-01-17 21:11:47 UTC (rev 11130)
@@ -37,11 +37,11 @@
    * @return Number of points changed (0).
    */
   template<typename MatType>
-  static size_t EmptyCluster(const MatType& data,
-                             const size_t emptyCluster,
-                             const MatType& centroids,
-                             arma::Col<size_t>& clusterCounts,
-                             arma::Col<size_t>& assignments)
+  static size_t EmptyCluster(const MatType& /* data */,
+                             const size_t /* emptyCluster */,
+                             const MatType& /* centroids */,
+                             arma::Col<size_t>& /* clusterCounts */,
+                             arma::Col<size_t>& /* assignments */)
   {
     // Empty clusters are okay!  Do nothing.
     return 0;

Modified: mlpack/trunk/src/mlpack/methods/neighbor_search/neighbor_search.hpp
===================================================================
--- mlpack/trunk/src/mlpack/methods/neighbor_search/neighbor_search.hpp	2012-01-17 20:31:20 UTC (rev 11129)
+++ mlpack/trunk/src/mlpack/methods/neighbor_search/neighbor_search.hpp	2012-01-17 21:11:47 UTC (rev 11130)
@@ -44,18 +44,18 @@
    * Initialization for a leaf, required by the StatisticType policy.
    */
   template<typename MatType>
-  QueryStat(const MatType& dataset, const size_t begin, const size_t count)
+  QueryStat(const MatType& /* dataset */, const size_t /* begin */, const size_t /* count */)
       : bound(SortPolicy::WorstDistance()) { }
 
   /**
    * Initialization for a node, required by the StatisticType policy.
    */
   template<typename MatType>
-  QueryStat(const MatType& dataset,
-            const size_t begin,
-            const size_t count,
-            const QueryStat& leftStat,
-            const QueryStat& rightStat)
+  QueryStat(const MatType& /* dataset */,
+            const size_t /* begin */,
+            const size_t /* count */,
+            const QueryStat& /* leftStat */,
+            const QueryStat& /* rightStat */)
       : bound(SortPolicy::WorstDistance()) { }
 
   //! Get the bound.

Modified: mlpack/trunk/src/mlpack/tests/tree_test.cpp
===================================================================
--- mlpack/trunk/src/mlpack/tests/tree_test.cpp	2012-01-17 20:31:20 UTC (rev 11129)
+++ mlpack/trunk/src/mlpack/tests/tree_test.cpp	2012-01-17 21:11:47 UTC (rev 11130)
@@ -1308,8 +1308,8 @@
 template<int t_pow>
 bool DoBoundsIntersect(HRectBound<t_pow>& a,
                        HRectBound<t_pow>& b,
-                       size_t ia,
-                       size_t ib)
+                       size_t /* ia */,
+                       size_t /* ib */)
 {
   size_t dimensionality = a.Dim();
 




More information about the mlpack-svn mailing list