diff --git a/src/storm/utility/vector.h b/src/storm/utility/vector.h index dd562a8e1..af6098038 100644 --- a/src/storm/utility/vector.h +++ b/src/storm/utility/vector.h @@ -142,6 +142,12 @@ namespace storm { return true; } + template + bool compareElementWise(std::vector const& left, std::vector const& right, Comparator comp = std::less()) { + STORM_LOG_ASSERT(left.size() == right.size(), "Expected that vectors for comparison have equal size"); + return std::equal(left.begin(), left.end(), right.begin(), comp); + } + /*! * Selects the elements from a vector at the specified positions and writes them consecutively into another vector. * @param vector The vector into which the selected elements are to be written.