[mlpack-git] master: Fix some style. (f852bc7)
gitdub at big.cc.gt.atl.ga.us
gitdub at big.cc.gt.atl.ga.us
Fri Jul 10 19:00:24 EDT 2015
Repository : https://github.com/mlpack/mlpack
On branch : master
Link : https://github.com/mlpack/mlpack/compare/4a97187bbba7ce8a6191b714949dd818ef0f37d2...e5905e62c15d1bcff21e6359b11efcd7ab6d7ca0
>---------------------------------------------------------------
commit f852bc70fc0c3b3e64e22ee74c27d73477f070ae
Author: ryan <ryan at ratml.org>
Date: Tue Apr 28 12:14:35 2015 -0400
Fix some style.
>---------------------------------------------------------------
f852bc70fc0c3b3e64e22ee74c27d73477f070ae
src/mlpack/core/tree/binary_space_tree/binary_space_tree.hpp | 6 +++---
.../core/tree/binary_space_tree/binary_space_tree_impl.hpp | 12 ++++--------
2 files changed, 7 insertions(+), 11 deletions(-)
diff --git a/src/mlpack/core/tree/binary_space_tree/binary_space_tree.hpp b/src/mlpack/core/tree/binary_space_tree/binary_space_tree.hpp
index 729143a..6e2e21f 100644
--- a/src/mlpack/core/tree/binary_space_tree/binary_space_tree.hpp
+++ b/src/mlpack/core/tree/binary_space_tree/binary_space_tree.hpp
@@ -213,9 +213,9 @@ class BinarySpaceTree
* @param ar Archive to load tree from. Must be an iarchive, not an oarchive!
*/
template<typename Archive>
- BinarySpaceTree(Archive& ar,
- const typename boost::enable_if<typename Archive::is_loading>::type* =
-0);
+ BinarySpaceTree(
+ Archive& ar,
+ const typename boost::enable_if<typename Archive::is_loading>::type* = 0);
/**
* Deletes this node, deallocating the memory for the children and calling
diff --git a/src/mlpack/core/tree/binary_space_tree/binary_space_tree_impl.hpp b/src/mlpack/core/tree/binary_space_tree/binary_space_tree_impl.hpp
index 863fa75..db2ad36 100644
--- a/src/mlpack/core/tree/binary_space_tree/binary_space_tree_impl.hpp
+++ b/src/mlpack/core/tree/binary_space_tree/binary_space_tree_impl.hpp
@@ -260,15 +260,11 @@ template<typename BoundType,
typename SplitType>
template<typename Archive>
BinarySpaceTree<BoundType, StatisticType, MatType, SplitType>::
- BinarySpaceTree(Archive& ar,
- const typename boost::enable_if<typename Archive::is_loading>::type*) : BinarySpaceTree()
+BinarySpaceTree(
+ Archive& ar,
+ const typename boost::enable_if<typename Archive::is_loading>::type*) :
+ BinarySpaceTree() // Create an empty BinarySpaceTree.
{
- if (!Archive::is_loading::value)
- {
- throw std::invalid_argument("Archive::is_loading is false; use an iarchive,"
- " not an oarchive!");
- }
-
// We've delegated to the constructor which gives us an empty tree, and now we
// can serialize from it.
ar >> data::CreateNVP(*this, "tree");
More information about the mlpack-git
mailing list