[mlpack-svn] r10796 - in mlpack/trunk/src/mlpack/core: data util

fastlab-svn at coffeetalk-1.cc.gatech.edu fastlab-svn at coffeetalk-1.cc.gatech.edu
Wed Dec 14 13:04:46 EST 2011


Author: rcurtin
Date: 2011-12-14 13:04:46 -0500 (Wed, 14 Dec 2011)
New Revision: 10796

Modified:
   mlpack/trunk/src/mlpack/core/data/load_impl.hpp
   mlpack/trunk/src/mlpack/core/data/save_impl.hpp
   mlpack/trunk/src/mlpack/core/util/cli_impl.hpp
   mlpack/trunk/src/mlpack/core/util/save_restore_utility_impl.hpp
Log:
Standard header include protection.


Modified: mlpack/trunk/src/mlpack/core/data/load_impl.hpp
===================================================================
--- mlpack/trunk/src/mlpack/core/data/load_impl.hpp	2011-12-14 17:58:43 UTC (rev 10795)
+++ mlpack/trunk/src/mlpack/core/data/load_impl.hpp	2011-12-14 18:04:46 UTC (rev 10796)
@@ -4,13 +4,12 @@
  *
  * Implementation of templatized load() function defined in load.hpp.
  */
-#ifndef __MLPACK_CORE_DATA_LOAD_HPP
-#error "Don't include this file directly; include mlpack/core/data/load.hpp."
-#endif
-
 #ifndef __MLPACK_CORE_DATA_LOAD_IMPL_HPP
 #define __MLPACK_CORE_DATA_LOAD_IMPL_HPP
 
+// In case it hasn't already been included.
+#include "load.hpp"
+
 namespace mlpack {
 namespace data {
 

Modified: mlpack/trunk/src/mlpack/core/data/save_impl.hpp
===================================================================
--- mlpack/trunk/src/mlpack/core/data/save_impl.hpp	2011-12-14 17:58:43 UTC (rev 10795)
+++ mlpack/trunk/src/mlpack/core/data/save_impl.hpp	2011-12-14 18:04:46 UTC (rev 10796)
@@ -4,13 +4,12 @@
  *
  * Implementation of save functionality.
  */
-#ifndef __MLPACK_CORE_DATA_SAVE_HPP
-#error "Don't include this file directly; include mlpack/core/data/save.hpp."
-#endif
-
 #ifndef __MLPACK_CORE_DATA_SAVE_IMPL_HPP
 #define __MLPACK_CORE_DATA_SAVE_IMPL_HPP
 
+// In case it hasn't already been included.
+#include "save.hpp"
+
 namespace mlpack {
 namespace data {
 

Modified: mlpack/trunk/src/mlpack/core/util/cli_impl.hpp
===================================================================
--- mlpack/trunk/src/mlpack/core/util/cli_impl.hpp	2011-12-14 17:58:43 UTC (rev 10795)
+++ mlpack/trunk/src/mlpack/core/util/cli_impl.hpp	2011-12-14 18:04:46 UTC (rev 10796)
@@ -4,13 +4,12 @@
  *
  * Implementation of templated functions of the CLI class.
  */
-#ifndef __MLPACK_CORE_IO_CLI_HPP
-#error "Do not include this file directly."
-#endif
-
 #ifndef __MLPACK_CORE_IO_CLI_IMPL_HPP
 #define __MLPACK_CORE_IO_CLI_IMPL_HPP
 
+// In case it has not already been included.
+#include "cli.hpp"
+
 // Include option.hpp here because it requires CLI but is also templated.
 #include "option.hpp"
 

Modified: mlpack/trunk/src/mlpack/core/util/save_restore_utility_impl.hpp
===================================================================
--- mlpack/trunk/src/mlpack/core/util/save_restore_utility_impl.hpp	2011-12-14 17:58:43 UTC (rev 10795)
+++ mlpack/trunk/src/mlpack/core/util/save_restore_utility_impl.hpp	2011-12-14 18:04:46 UTC (rev 10796)
@@ -4,13 +4,13 @@
  *
  * The SaveRestoreUtility provides helper functions in saving and
  *   restoring models.  The current output file type is XML.
- *
- * @experimental
  */
-#ifndef SAVE_RESTORE_MODEL_HPP
-#error "Do not include this header directly."
-#endif
+#ifndef __MLPACK_CORE_UTIL_SAVE_RESTORE_UTILITY_IMPL_HPP
+#define __MLPACK_CORE_UTIL_SAVE_RESTORE_UTILITY_IMPL_HPP
 
+// In case it hasn't been included already.
+#include "save_restore_utility.hpp"
+
 using namespace mlpack;
 using namespace mlpack::utilities;
 
@@ -79,3 +79,5 @@
   vectorAsStr.erase(vectorAsStr.length() - 1);
   parameters[name] = vectorAsStr;
 }
+
+#endif




More information about the mlpack-svn mailing list