diff options
author | Willem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl> | 2016-07-28 15:32:50 +0200 |
---|---|---|
committer | Willem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl> | 2016-07-28 15:32:50 +0200 |
commit | 584fb584816aefca42518c9a6075ac2df814dac6 (patch) | |
tree | 8af36cd0fb5bc1691fe658823ec3731119500052 /matlab | |
parent | 302b0c7eacf46c7315f2390e270ad20f5025c342 (diff) | |
download | astra-584fb584816aefca42518c9a6075ac2df814dac6.tar.gz astra-584fb584816aefca42518c9a6075ac2df814dac6.tar.bz2 astra-584fb584816aefca42518c9a6075ac2df814dac6.tar.xz astra-584fb584816aefca42518c9a6075ac2df814dac6.zip |
Replace use of boost::split by own function
Diffstat (limited to 'matlab')
-rw-r--r-- | matlab/mex/mexHelpFunctions.cpp | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/matlab/mex/mexHelpFunctions.cpp b/matlab/mex/mexHelpFunctions.cpp index b13dde3..d957aea 100644 --- a/matlab/mex/mexHelpFunctions.cpp +++ b/matlab/mex/mexHelpFunctions.cpp @@ -33,11 +33,6 @@ $Id$ #include "mexHelpFunctions.h" #include "astra/Utilities.h" -#include <algorithm> -#include <boost/algorithm/string.hpp> -#include <boost/algorithm/string/split.hpp> -#include <boost/algorithm/string/classification.hpp> - using namespace std; using namespace astra; @@ -362,8 +357,8 @@ mxArray* stringToMxArray(std::string input) // split rows std::vector<std::string> row_strings; std::vector<std::string> col_strings; - boost::split(row_strings, input, boost::is_any_of(";")); - boost::split(col_strings, row_strings[0], boost::is_any_of(",")); + StringUtil::splitString(row_strings, input, ";"); + StringUtil::splitString(col_strings, row_strings[0], ","); // get dimensions int rows = row_strings.size(); @@ -375,7 +370,7 @@ mxArray* stringToMxArray(std::string input) // loop elements for (unsigned int row = 0; row < rows; row++) { - boost::split(col_strings, row_strings[row], boost::is_any_of(",")); + StringUtil::splitString(col_strings, row_strings[row], ","); // check size for (unsigned int col = 0; col < col_strings.size(); col++) { out[col*rows + row] = StringUtil::stringToFloat(col_strings[col]); @@ -389,7 +384,7 @@ mxArray* stringToMxArray(std::string input) // split std::vector<std::string> items; - boost::split(items, input, boost::is_any_of(",")); + StringUtil::splitString(items, input, ","); // init matrix mxArray* pVector = mxCreateDoubleMatrix(1, items.size(), mxREAL); |