[mlpack-git] master: Fix test bugs. (6376680)

gitdub at mlpack.org gitdub at mlpack.org
Sun Oct 30 08:49:12 EDT 2016


Repository : https://github.com/mlpack/mlpack
On branch  : master
Link       : https://github.com/mlpack/mlpack/compare/31995784e651e1c17c988c79d9f53c9dbad620f8...81fce4edfc8bfb4c26b48ed388f559ec1cee26dd

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

commit 6376680fa1463574bd151424b8973edf4a69a3dd
Author: Ryan Curtin <ryan at ratml.org>
Date:   Sun Oct 30 21:49:12 2016 +0900

    Fix test bugs.


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

6376680fa1463574bd151424b8973edf4a69a3dd
 src/mlpack/methods/approx_kfn/qdafn_impl.hpp | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/mlpack/methods/approx_kfn/qdafn_impl.hpp b/src/mlpack/methods/approx_kfn/qdafn_impl.hpp
index 475538c..4e2104e 100644
--- a/src/mlpack/methods/approx_kfn/qdafn_impl.hpp
+++ b/src/mlpack/methods/approx_kfn/qdafn_impl.hpp
@@ -34,9 +34,14 @@ QDAFN<MatType>::QDAFN(const MatType& referenceSet,
 // Train the object.
 template<typename MatType>
 void QDAFN<MatType>::Train(const MatType& referenceSet,
-                           const size_t l,
-                           const size_t m)
+                           const size_t lIn,
+                           const size_t mIn)
 {
+  if (lIn != 0)
+    l = lIn;
+  if (mIn != 0)
+    m = mIn;
+
   // Build tables.  This is done by drawing random points from a Gaussian
   // distribution as the vectors we project onto.  The Gaussian should have zero
   // mean and unit variance.




More information about the mlpack-git mailing list