From 8cadf228fc211f2cfa159676aa2207daeeb68fe0 Mon Sep 17 00:00:00 2001 From: Sebastian Junges Date: Thu, 23 Apr 2020 11:33:41 -0700 Subject: [PATCH] does a model have a choice labelling? --- src/storage/model.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/storage/model.cpp b/src/storage/model.cpp index a0ceafe..ad2e141 100644 --- a/src/storage/model.cpp +++ b/src/storage/model.cpp @@ -169,6 +169,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("has_choice_labeling", [](SparseModel const& model) {model.hasChoiceLabeling();}, "Does the model have an associated choice labelling?") .def_property_readonly("choice_labeling", [](SparseModel const& model) {return model.getChoiceLabeling();}, "get choice labelling") .def("has_choice_origins", [](SparseModel const& model) {return model.hasChoiceOrigins();}, "has choice origins?") .def_property_readonly("choice_origins", [](SparseModel const& model) {return model.getChoiceOrigins();})