9#include <boost/algorithm/string/predicate.hpp>
29 auto const &otherPath = other.path();
30 if (
depth() - other.depth() == 1)
47 childPath.emplace_back(
n);
54 auto &path = location.
path();
57 auto it = path.cbegin();
58 for (; it < path.cend() - 1; ++it)
71 auto &lhsPath = this->
path();
72 auto &rhsPath = other.path();
73 return boost::algorithm::lexicographical_compare(lhsPath, rhsPath);
84 "RowLocation::relativeTo: Tried to get position relative to "
85 "node which was not an ancestor");
90 if (!(
isRoot() || other.isRoot())) {
91 auto const &otherPath = other.path();
92 if (
depth() == other.depth())
105 auto const &ancestorPath = ancestor.
path();
108 ancestorPath.cend());
115 auto &pathA = locationA.
path();
116 auto &pathB = locationB.
path();
118 "pathsSameUntilDepth: Comparison depth must be less than or "
119 "equal to the depth of both locations");
120 return boost::algorithm::equal(pathA.cbegin(), pathA.cbegin() + depth, pathB.cbegin(), pathB.cbegin() + depth);
void assertOrThrow(bool condition, std::string const &message)
See the developer documentation for Batch Widget at developer.mantidproject.org/BatchWidget/index....
Test ranges to if they are equal.
bool equal(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, InputIterator2 last2, BinaryPredicate pred)