[mlpack] 43/53: Fix incorrect error conditional.

Barak A. Pearlmutter barak+git at pearlmutter.net
Mon Nov 14 00:46:50 UTC 2016


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

bap pushed a commit to branch master
in repository mlpack.

commit 74c07da1b5aa01e3067e279fba5cfbe97e38c11f
Author: Ryan Curtin <ryan at ratml.org>
Date:   Sun Oct 30 12:51:40 2016 -0400

    Fix incorrect error conditional.
---
 src/mlpack/methods/approx_kfn/qdafn_impl.hpp | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/mlpack/methods/approx_kfn/qdafn_impl.hpp b/src/mlpack/methods/approx_kfn/qdafn_impl.hpp
index 8d64f95..bb8408c 100644
--- a/src/mlpack/methods/approx_kfn/qdafn_impl.hpp
+++ b/src/mlpack/methods/approx_kfn/qdafn_impl.hpp
@@ -20,9 +20,9 @@ namespace neighbor {
 template<typename MatType>
 QDAFN<MatType>::QDAFN(const size_t l, const size_t m) : l(l), m(m)
 {
-  if (l > 0)
+  if (l == 0)
     throw std::invalid_argument("QDAFN::QDAFN(): l must be greater than 0!");
-  if (m > 0)
+  if (m == 0)
     throw std::invalid_argument("QDAFN::QDAFN(): m must be greater than 0!");
 }
 
@@ -34,9 +34,9 @@ QDAFN<MatType>::QDAFN(const MatType& referenceSet,
     l(l),
     m(m)
 {
-  if (l > 0)
+  if (l == 0)
     throw std::invalid_argument("QDAFN::QDAFN(): l must be greater than 0!");
-  if (m > 0)
+  if (m == 0)
     throw std::invalid_argument("QDAFN::QDAFN(): m must be greater than 0!");
 
   Train(referenceSet);

-- 
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