diff --git a/src/core/result.cpp b/src/core/result.cpp index 1e0a762..a0ae32b 100644 --- a/src/core/result.cpp +++ b/src/core/result.cpp @@ -1,5 +1,11 @@ #include "result.h" +// Thin wrapper +template +std::vector getValues(storm::modelchecker::ExplicitQuantitativeCheckResult const& result) { + return result.getValueVector(); +} + // Define python bindings void define_result(py::module& m) { @@ -53,14 +59,14 @@ void define_result(py::module& m) { .def("at", [](storm::modelchecker::ExplicitQuantitativeCheckResult const& result, storm::storage::sparse::state_type state) { return result[state]; }, py::arg("state"), "Get result for given state") - .def("get_values", &storm::modelchecker::ExplicitQuantitativeCheckResult::getValueVector, "Get model checking result values for all states") + .def("get_values", &getValues, "Get model checking result values for all states") ; py::class_, std::shared_ptr>> parametricQuantitativeCheckResult(m, "_ParametricQuantitativeCheckResult", "Abstract class for parametric quantitative model checking results", checkResult); py::class_, std::shared_ptr>>(m, "ExplicitParametricQuantitativeCheckResult", "Explicit parametric quantitative model checking result", parametricQuantitativeCheckResult) .def("at", [](storm::modelchecker::ExplicitQuantitativeCheckResult const& result, storm::storage::sparse::state_type state) { return result[state]; }, py::arg("state"), "Get result for given state") - .def("get_values", &storm::modelchecker::ExplicitQuantitativeCheckResult::getValueVector, "Get model checking result values for all states") + .def("get_values", &getValues, "Get model checking result values for all states") ; } diff --git a/src/utility/shortestPaths.cpp b/src/utility/shortestPaths.cpp index 3fed97e..7f647c7 100644 --- a/src/utility/shortestPaths.cpp +++ b/src/utility/shortestPaths.cpp @@ -36,7 +36,7 @@ void define_ksp(py::module& m) { .def(py::self == py::self, "Compares predecessor node and index, ignoring distance") - .def("__str__", &streamToString) + //.def("__str__", &streamToString) .def_readwrite("predecessorNode", &Path::predecessorNode) // TODO (un-)wrap boost::optional so it's usable .def_readwrite("predecessorK", &Path::predecessorK) @@ -60,4 +60,4 @@ void define_ksp(py::module& m) { .def("get_states", &ShortestPathsGenerator::getStates, "k"_a) .def("get_path_as_list", &ShortestPathsGenerator::getPathAsList, "k"_a) ; -} \ No newline at end of file +}