From c3959267c22431d99d187985f3a832259223a05c Mon Sep 17 00:00:00 2001 From: Sebastian Junges Date: Tue, 14 Apr 2020 09:40:51 -0700 Subject: [PATCH] model.is_sink_state(state) --- src/storage/model.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/storage/model.cpp b/src/storage/model.cpp index 3023be8..62fb56d 100644 --- a/src/storage/model.cpp +++ b/src/storage/model.cpp @@ -183,6 +183,7 @@ void define_sparse_model(py::module& m) { .def("has_state_valuations", [](SparseModel const& model) {return model.hasStateValuations();}, "has state valuation?") .def_property_readonly("state_valuations", [](SparseModel const& model) {return model.getStateValuations();}, "state valuations") .def("reduce_to_state_based_rewards", &SparseModel::reduceToStateBasedRewards) + .def("is_sink_state", &SparseModel::isSinkState, py::arg("state")) .def("__str__", &getModelInfoPrinter) .def("to_dot", [](SparseModel& model) { std::stringstream ss; model.writeDotToStream(ss); return ss.str(); }, "Write dot to a string") ; @@ -246,6 +247,7 @@ void define_sparse_model(py::module& m) { .def("has_state_valuations", [](SparseModel const& model) {return model.hasStateValuations();}, "has state valuation?") .def_property_readonly("state_valuations", [](SparseModel const& model) {return model.getStateValuations();}, "state valuations") .def("reduce_to_state_based_rewards", &SparseModel::reduceToStateBasedRewards) + .def("is_sink_state", &SparseModel::isSinkState, py::arg("state")) .def("__str__", &getModelInfoPrinter) .def("to_dot", [](SparseModel& model) { std::stringstream ss; model.writeDotToStream(ss); return ss.str(); }, "Write dot to a string") ;