Browse Source

write / load winning regions

refactoring
Sebastian Junges 5 years ago
parent
commit
dd7506c231
  1. 2
      src/pomdp/qualitative_analysis.cpp
  2. 2
      src/storage/bitvector.cpp

2
src/pomdp/qualitative_analysis.cpp

@ -43,4 +43,6 @@ void define_qualitative_policy_search_nt(py::module& m) {
mssqopts.def(py::init<>());
py::class_<storm::pomdp::WinningRegion> winningRegion(m, "BeliefSupportWinningRegion");
winningRegion.def_static("load_from_file", &storm::pomdp::WinningRegion::loadFromFile, py::arg("filepath"));
winningRegion.def("store_to_file", &storm::pomdp::WinningRegion::storeToFile, py::arg("filepath"));
}

2
src/storage/bitvector.cpp

@ -33,6 +33,8 @@ void define_bitvector(py::module& m) {
.def("__iter__", [](const BitVector &b) { return py::make_iterator(b.begin(), b.end()); },
py::keep_alive<0, 1>() /* Essential: keep object alive while iterator exists */)
.def("store_as_string", [](const BitVector& bv) {std::stringstream strs; bv.store(strs); return strs.str();})
.def_static("load_from_string", &BitVector::load, py::arg("description"))
.def(py::self == py::self)
.def(py::self != py::self)

Loading…
Cancel
Save