Browse Source

added function to check whether a vector has a zero element

tempestpy_adaptions
TimQu 7 years ago
parent
commit
fbce6a4795
  1. 5
      src/storm/utility/vector.h

5
src/storm/utility/vector.h

@ -1121,6 +1121,11 @@ namespace storm {
return std::any_of(v.begin(), v.end(), [](T value){return !storm::utility::isZero(value);}); return std::any_of(v.begin(), v.end(), [](T value){return !storm::utility::isZero(value);});
} }
template<typename T>
bool hasZeroEntry(std::vector<T> const& v){
return std::any_of(v.begin(), v.end(), [](T value){return storm::utility::isZero(value);});
}
inline std::set<storm::RationalFunctionVariable> getVariables(std::vector<storm::RationalFunction> const& vector) { inline std::set<storm::RationalFunctionVariable> getVariables(std::vector<storm::RationalFunction> const& vector) {
std::set<storm::RationalFunctionVariable> result; std::set<storm::RationalFunctionVariable> result;
for(auto const& entry : vector) { for(auto const& entry : vector) {

Loading…
Cancel
Save