[mlpack-git] master: delete unused string_util (596a3e3)
gitdub at mlpack.org
gitdub at mlpack.org
Wed Jun 8 15:52:00 EDT 2016
Repository : https://github.com/mlpack/mlpack
On branch : master
Link : https://github.com/mlpack/mlpack/compare/e8e2ff17da5978cacf3c9a45d4aa572a4bf008e5...28a49fa829caaf211cb9c85b013bf36fe9c1b7ba
>---------------------------------------------------------------
commit 596a3e3260631a080dbc7026b7b043e94b3bd580
Author: Keon Kim <kwk236 at gmail.com>
Date: Thu Jun 9 04:52:00 2016 +0900
delete unused string_util
>---------------------------------------------------------------
596a3e3260631a080dbc7026b7b043e94b3bd580
.../binary_space_tree/binary_space_tree_impl.hpp | 1 -
.../core/tree/cover_tree/cover_tree_impl.hpp | 1 -
.../tree/rectangle_tree/rectangle_tree_impl.hpp | 1 -
src/mlpack/core/util/CMakeLists.txt | 2 -
src/mlpack/core/util/prefixedoutstream.hpp | 1 -
src/mlpack/core/util/string_util.cpp | 47 ----------------------
src/mlpack/core/util/string_util.hpp | 23 -----------
7 files changed, 76 deletions(-)
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 ee2f20b..227129b 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
@@ -11,7 +11,6 @@
#include <mlpack/core/util/cli.hpp>
#include <mlpack/core/util/log.hpp>
-#include <mlpack/core/util/string_util.hpp>
#include <queue>
namespace mlpack {
diff --git a/src/mlpack/core/tree/cover_tree/cover_tree_impl.hpp b/src/mlpack/core/tree/cover_tree/cover_tree_impl.hpp
index cc1049d..3d3b012 100644
--- a/src/mlpack/core/tree/cover_tree/cover_tree_impl.hpp
+++ b/src/mlpack/core/tree/cover_tree/cover_tree_impl.hpp
@@ -10,7 +10,6 @@
// In case it hasn't already been included.
#include "cover_tree.hpp"
-#include <mlpack/core/util/string_util.hpp>
#include <string>
namespace mlpack {
diff --git a/src/mlpack/core/tree/rectangle_tree/rectangle_tree_impl.hpp b/src/mlpack/core/tree/rectangle_tree/rectangle_tree_impl.hpp
index d993a45..5e35443 100644
--- a/src/mlpack/core/tree/rectangle_tree/rectangle_tree_impl.hpp
+++ b/src/mlpack/core/tree/rectangle_tree/rectangle_tree_impl.hpp
@@ -12,7 +12,6 @@
#include <mlpack/core/util/cli.hpp>
#include <mlpack/core/util/log.hpp>
-#include <mlpack/core/util/string_util.hpp>
namespace mlpack {
namespace tree {
diff --git a/src/mlpack/core/util/CMakeLists.txt b/src/mlpack/core/util/CMakeLists.txt
index 39b4010..e75b2cb 100644
--- a/src/mlpack/core/util/CMakeLists.txt
+++ b/src/mlpack/core/util/CMakeLists.txt
@@ -20,8 +20,6 @@ set(SOURCES
prefixedoutstream.cpp
prefixedoutstream_impl.hpp
sfinae_utility.hpp
- string_util.hpp
- string_util.cpp
timers.hpp
timers.cpp
version.hpp
diff --git a/src/mlpack/core/util/prefixedoutstream.hpp b/src/mlpack/core/util/prefixedoutstream.hpp
index 13ead9e..e2370ca 100644
--- a/src/mlpack/core/util/prefixedoutstream.hpp
+++ b/src/mlpack/core/util/prefixedoutstream.hpp
@@ -19,7 +19,6 @@
#include <boost/type_traits.hpp>
#include <mlpack/core/util/sfinae_utility.hpp>
-#include <mlpack/core/util/string_util.hpp>
namespace mlpack {
namespace util {
diff --git a/src/mlpack/core/util/string_util.cpp b/src/mlpack/core/util/string_util.cpp
deleted file mode 100644
index 1dc54b2..0000000
--- a/src/mlpack/core/util/string_util.cpp
+++ /dev/null
@@ -1,47 +0,0 @@
-/**
- * @file string_util.cpp
- * @author Trironk Kiatkungwanglai
- * @author Ryan Birmingham
- *
- * Defines methods useful for formatting output.
- */
-#include "string_util.hpp"
-
-using namespace mlpack;
-using namespace mlpack::util;
-using namespace std;
-
-//! A utility function that replaces all all newlines with a number of spaces
-//! depending on the indentation level.
-string mlpack::util::Indent(string input, const size_t howManyTabs)
-{
- // For each declared...
- string standardTab = " ";
- string bigTab = "";
- for (size_t ind = 0; ind < howManyTabs; ind++)
- {
- // Increase amount tabbed on later lines.
- bigTab += standardTab;
-
- // Add indentation to first line.
- input.insert(0, 1, ' ');
- input.insert(0, 1, ' ');
- }
-
- // Create the character sequence to replace all newline characters.
- std::string tabbedNewline("\n" + bigTab);
-
- // Replace all newline characters with the precomputed character sequence.
- size_t startPos = 0;
- while ((startPos = input.find("\n", startPos)) != string::npos)
- {
- // Don't replace the last newline.
- if (startPos == input.length() - 1)
- break;
-
- input.replace(startPos, 1, tabbedNewline);
- startPos += tabbedNewline.length();
- }
-
- return input;
-}
diff --git a/src/mlpack/core/util/string_util.hpp b/src/mlpack/core/util/string_util.hpp
deleted file mode 100644
index 7fa9080..0000000
--- a/src/mlpack/core/util/string_util.hpp
+++ /dev/null
@@ -1,23 +0,0 @@
-/**
- * @file string_util.hpp
- * @author Trironk Kiatkungwanglai
- * @author Ryan Birmingham
- *
- * Declares methods that are useful for writing formatting output.
- */
-#ifndef MLPACK_CORE_STRING_UTIL_HPP
-#define MLPACK_CORE_STRING_UTIL_HPP
-
-#include <string>
-
-namespace mlpack {
-namespace util {
-
-//! A utility function that replaces all all newlines with a number of spaces
-//! depending on the indentation level.
-std::string Indent(std::string input, const size_t howManyTabs = 1);
-
-} // namespace util
-} // namespace mlpack
-
-#endif
More information about the mlpack-git
mailing list