diff --git a/src/storage/labeling.cpp b/src/storage/labeling.cpp index 8b9ef67..25aa4ba 100644 --- a/src/storage/labeling.cpp +++ b/src/storage/labeling.cpp @@ -3,6 +3,7 @@ #include "storm/models/sparse/ItemLabeling.h" #include "storm/models/sparse/StateLabeling.h" +#include "storm/models/sparse/ChoiceLabeling.h" // Define python bindings void define_labeling(py::module& m) { @@ -30,4 +31,6 @@ void define_labeling(py::module& m) { .def("__str__", &streamToString) ; + + py::class_(m, "ChoiceLabeling", "Labeling for choices", labeling); } diff --git a/src/storage/model.cpp b/src/storage/model.cpp index f2f49a1..99995bb 100644 --- a/src/storage/model.cpp +++ b/src/storage/model.cpp @@ -164,6 +164,7 @@ void define_sparse_model(py::module& m) { // Models with double numbers py::class_, std::shared_ptr>, ModelBase> model(m, "_SparseModel", "A probabilistic model where transitions are represented by doubles and saved in a sparse matrix"); model.def_property_readonly("labeling", &getLabeling, "Labels") + .def_property_readonly("choice_labeling", [](SparseModel const& model) {return model.getChoiceLabeling();}, "get choice labelling") .def("labels_state", &SparseModel::getLabelsOfState, py::arg("state"), "Get labels of state") .def_property_readonly("initial_states", &getSparseInitialStates, "Initial states") .def_property_readonly("states", [](SparseModel& model) {