From fbce6a479598544949421558f3984fbfc5649c8a Mon Sep 17 00:00:00 2001 From: TimQu Date: Thu, 28 Jun 2018 13:02:29 +0200 Subject: [PATCH] added function to check whether a vector has a zero element --- src/storm/utility/vector.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/storm/utility/vector.h b/src/storm/utility/vector.h index ac73e48d5..67cdd9838 100644 --- a/src/storm/utility/vector.h +++ b/src/storm/utility/vector.h @@ -1120,6 +1120,11 @@ namespace storm { bool hasNonZeroEntry(std::vector const& v){ return std::any_of(v.begin(), v.end(), [](T value){return !storm::utility::isZero(value);}); } + + template + bool hasZeroEntry(std::vector const& v){ + return std::any_of(v.begin(), v.end(), [](T value){return storm::utility::isZero(value);}); + } inline std::set getVariables(std::vector const& vector) { std::set result;