From 5d41f02e161d066d8a353c28a406d9267f8abd54 Mon Sep 17 00:00:00 2001 From: Sebastian Junges Date: Tue, 14 Apr 2020 09:41:55 -0700 Subject: [PATCH] state valuations.get_state() by reference, and simple valuations __str__ now only has optional arguments --- src/storage/valuation.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/storage/valuation.cpp b/src/storage/valuation.cpp index 212a01d..06f4b8e 100644 --- a/src/storage/valuation.cpp +++ b/src/storage/valuation.cpp @@ -9,7 +9,7 @@ void define_statevaluation(py::module& m) { py::class_> statevaluation(m,"StateValuation", "Valuations for explicit states"); - statevaluation.def("get_state", &storm::storage::sparse::StateValuations::getStateValuation) + statevaluation.def("get_state", &storm::storage::sparse::StateValuations::getStateValuation, py::return_value_policy::reference) ; } @@ -18,5 +18,5 @@ void define_simplevaluation(py::module& m) { py::class_> simplevaluation(m, "SimpleValuation", "Valuations for storm variables"); simplevaluation.def("get_boolean_value", &storm::expressions::SimpleValuation::getBooleanValue); simplevaluation.def("get_integer_value", &storm::expressions::SimpleValuation::getIntegerValue); - simplevaluation.def("__str__", &storm::expressions::SimpleValuation::toString); + simplevaluation.def("__str__", &storm::expressions::SimpleValuation::toString, py::arg("pretty")=true); }