[mlpack-git] master: Fix incorrect conditionals. Thanks to Sergiu Deitsch for pointing these out. (95ee836)

gitdub at mlpack.org gitdub at mlpack.org
Sat Jul 16 16:21:31 EDT 2016


Repository : https://github.com/mlpack/mlpack
On branch  : master
Link       : https://github.com/mlpack/mlpack/compare/59bc0b32630a3ad786706993f4d5e8b087f1c702...0d9a0e263a32b99d8dcf5d2723b3b92c67e669fc

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

commit 95ee8366c0bf3223d7df607a8b17c5587043fbcc
Author: Ryan Curtin <ryan at ratml.org>
Date:   Sat Jul 16 16:21:31 2016 -0400

    Fix incorrect conditionals.  Thanks to Sergiu Deitsch for pointing these out.


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

95ee8366c0bf3223d7df607a8b17c5587043fbcc
 src/mlpack/methods/gmm/gmm_generate_main.cpp    | 2 +-
 src/mlpack/methods/gmm/gmm_probability_main.cpp | 2 +-
 src/mlpack/methods/mvu/mvu_main.cpp             | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/mlpack/methods/gmm/gmm_generate_main.cpp b/src/mlpack/methods/gmm/gmm_generate_main.cpp
index cc1e3f9..787b90b 100644
--- a/src/mlpack/methods/gmm/gmm_generate_main.cpp
+++ b/src/mlpack/methods/gmm/gmm_generate_main.cpp
@@ -31,7 +31,7 @@ int main(int argc, char** argv)
 {
   CLI::ParseCommandLine(argc, argv);
 
-  if (CLI::HasParam("output_file"))
+  if (!CLI::HasParam("output_file"))
     Log::Warn << "--output_file (-o) is not specified;"
         << "no results will be saved!" << endl;
 
diff --git a/src/mlpack/methods/gmm/gmm_probability_main.cpp b/src/mlpack/methods/gmm/gmm_probability_main.cpp
index 4c53bdc..ec39c31 100644
--- a/src/mlpack/methods/gmm/gmm_probability_main.cpp
+++ b/src/mlpack/methods/gmm/gmm_probability_main.cpp
@@ -32,7 +32,7 @@ int main(int argc, char** argv)
   const string inputModelFile = CLI::GetParam<string>("input_model_file");
   const string outputFile = CLI::GetParam<string>("output_file");
 
-  if (CLI::HasParam("output_file"))
+  if (!CLI::HasParam("output_file"))
     Log::Warn << "--output_file (-o) is not specified;"
         << "no results will be saved!" << endl;
 
diff --git a/src/mlpack/methods/mvu/mvu_main.cpp b/src/mlpack/methods/mvu/mvu_main.cpp
index 9b1bf0d..de54048 100644
--- a/src/mlpack/methods/mvu/mvu_main.cpp
+++ b/src/mlpack/methods/mvu/mvu_main.cpp
@@ -37,7 +37,7 @@ int main(int argc, char **argv)
   const int newDim = CLI::GetParam<int>("new_dim");
   const int numNeighbors = CLI::GetParam<int>("num_neighbors");
 
-  if (CLI::HasParam("output_file"))
+  if (!CLI::HasParam("output_file"))
     Log::Warn << "--output_file (-o) is not specified; no results will be "
         << "saved!" << endl;
 




More information about the mlpack-git mailing list