Browse Source

flatsets to string

tempestpy_adaptions
Sebastian Junges 5 years ago
parent
commit
2de8c94fd9
  1. 22
      src/storm/storage/BoostTypes.h

22
src/storm/storage/BoostTypes.h

@ -2,6 +2,7 @@
#include <boost/container/flat_set.hpp>
#include <sstream>
namespace storm {
namespace storage {
@ -11,5 +12,26 @@ namespace storm {
template<typename Key>
using FlatSet = boost::container::flat_set<Key, std::less<Key>, boost::container::new_allocator<Key>>;
/*!
* Output vector as string.
*
* @param vector Vector to output.
* @return String containing the representation of the vector.
*/
template<typename ValueType>
std::string toString(FlatSet<ValueType> const& set) {
std::stringstream stream;
stream << "flatset { ";
if (!set.empty()) {
for(auto const& entry : set) {
stream << entry << " ";
}
}
stream << " }";
return stream.str();
}
}
}
Loading…
Cancel
Save