[mlpack] 271/324: Hierarchical model support

Barak A. Pearlmutter barak+git at cs.nuim.ie
Sun Aug 17 08:22:17 UTC 2014


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

bap pushed a commit to branch svn-trunk
in repository mlpack.

commit caad14ac14216fa95773856e3f63b548c9b633a4
Author: michaelfox99 <michaelfox99 at 9d5b8971-822b-0410-80eb-d18c1038ef23>
Date:   Tue Aug 5 13:24:06 2014 +0000

    Hierarchical model support
    
    
    git-svn-id: http://svn.cc.gatech.edu/fastlab/mlpack/trunk@16955 9d5b8971-822b-0410-80eb-d18c1038ef23
---
 src/mlpack/core/util/save_restore_utility_impl.hpp | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/src/mlpack/core/util/save_restore_utility_impl.hpp b/src/mlpack/core/util/save_restore_utility_impl.hpp
index 2ae667f..e21c5f4 100644
--- a/src/mlpack/core/util/save_restore_utility_impl.hpp
+++ b/src/mlpack/core/util/save_restore_utility_impl.hpp
@@ -16,9 +16,9 @@ namespace mlpack {
 namespace util {
 
 template<typename T>
-T& SaveRestoreUtility::LoadParameter(T& t, const std::string& name)
+T& SaveRestoreUtility::LoadParameter(T& t, const std::string& name) const
 {
-  std::map<std::string, std::string>::iterator it = parameters.find(name);
+  std::map<std::string, std::string>::const_iterator it = parameters.find(name);
   if (it != parameters.end())
   {
     std::string value = (*it).second;
@@ -35,9 +35,9 @@ T& SaveRestoreUtility::LoadParameter(T& t, const std::string& name)
 
 template<typename T>
 std::vector<T>& SaveRestoreUtility::LoadParameter(std::vector<T>& v,
-                                                  const std::string& name)
+                                                  const std::string& name) const
 {
-  std::map<std::string, std::string>::iterator it = parameters.find(name);
+  std::map<std::string, std::string>::const_iterator it = parameters.find(name);
   if (it != parameters.end())
   {
     v.clear();
@@ -87,6 +87,7 @@ void SaveRestoreUtility::SaveParameter(const std::vector<T>& t,
   parameters[name] = vectorAsStr;
 }
 
+    
 }; // namespace util
 }; // namespace mlpack
 

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