1 #ifndef OPENPOSE_UTILITIES_STANDARD_HPP
2 #define OPENPOSE_UTILITIES_STANDARD_HPP
9 bool vectorsAreEqual(
const std::vector<T>& vectorA,
const std::vector<T>& vectorB)
13 if (vectorA.size() != vectorB.size())
17 for (
auto i = 0u ; i < vectorA.size() ; i++)
18 if (vectorA[i] != vectorB[i])
23 catch (
const std::exception& e)
25 error(e.what(), __LINE__, __FUNCTION__, __FILE__);
40 std::vector<T>
mergeVectors(
const std::vector<T>& vectorA,
const std::vector<T>& vectorB)
44 auto vectorToReturn(vectorA);
45 for (
auto& tElement : vectorB)
46 vectorToReturn.emplace_back(tElement);
47 return vectorToReturn;
49 catch (
const std::exception& e)
51 error(e.what(), __LINE__, __FUNCTION__, __FILE__);
52 return std::vector<T>{};
OP_API void error(const std::string &message, const int line=-1, const std::string &function="", const std::string &file="")
std::vector< T > mergeVectors(const std::vector< T > &vectorA, const std::vector< T > &vectorB)
bool vectorsAreEqual(const std::vector< T > &vectorA, const std::vector< T > &vectorB)