diff --git a/src/storage/valuation.cpp b/src/storage/valuation.cpp index 1cbce5a..7b9df75 100644 --- a/src/storage/valuation.cpp +++ b/src/storage/valuation.cpp @@ -10,7 +10,7 @@ std::string toJson(storm::storage::sparse::StateValuations const& valuations, st return valuations.toJson(stateIndex, selectedVariables).dump(); } -void add_state(storm::storage::sparse::StateValuationsBuilder& builder, storm::storage::sparse::state_type const& state, std::vector&& booleanValues = {}, std::vector&& integerValues = {}, std::vector&& rationalValues = {}) { +void add_state(storm::storage::sparse::StateValuationsBuilder& builder, storm::storage::sparse::state_type const& state, std::vector&& booleanValues, std::vector&& integerValues, std::vector&& rationalValues) { return builder.addState(state, std::move(booleanValues), std::move(integerValues), std::move(rationalValues)); } @@ -31,7 +31,7 @@ void define_statevaluation(py::module& m) { py::class_>(m,"StateValuationsBuilder") .def(py::init<>()) .def("add_variable", &storm::storage::sparse::StateValuationsBuilder::addVariable, py::arg("variable"), "Adds a new variable") - .def("add_state", &add_state,py::arg("state"),py::arg("boolean_values"), py::arg("integer_values"), py::arg("rational_values"), "Adds a new state, no more variables should be added afterwards") + .def("add_state", &add_state, py::arg("state"), py::arg("boolean_values") = std::vector(), py::arg("integer_values") = std::vector(), py::arg("rational_values") = std::vector(), "Adds a new state, no more variables should be added afterwards") .def("build", &storm::storage::sparse::StateValuationsBuilder::build, "Creates the finalized state valuations object") ; diff --git a/tests/storage/test_model_components.py b/tests/storage/test_model_components.py index a7efffc..35621e1 100644 --- a/tests/storage/test_model_components.py +++ b/tests/storage/test_model_components.py @@ -76,9 +76,9 @@ class TestSparseModelComponents: for s in range(7): - v_builder.add_state(state=s,boolean_values=[],integer_values=[s,0],rational_values=[]) + v_builder.add_state(state=s,integer_values=[s,0]) for s in range(7,13): - v_builder.add_state(state=s,boolean_values=[],integer_values=[7,s-6],rational_values=[]) + v_builder.add_state(state=s,integer_values=[7,s-6]) state_valuations = v_builder.build(13)