diff --git a/src/storage/state.cpp b/src/storage/state.cpp index fadd676..b13c887 100644 --- a/src/storage/state.cpp +++ b/src/storage/state.cpp @@ -17,12 +17,14 @@ void define_state(py::module& m) { .def_property_readonly("id", &SparseModelState::getIndex, "Id") .def_property_readonly("labels", &SparseModelState::getLabels, "Labels") .def_property_readonly("actions", &SparseModelState::getActions, "Get actions") + .def("__int__",&SparseModelState::getIndex) ; py::class_>(m, "SparseParametricModelState", "State in sparse parametric model") .def("__str__", &SparseModelState::toString) .def_property_readonly("id", &SparseModelState::getIndex, "Id") .def_property_readonly("labels", &SparseModelState::getLabels, "Labels") .def_property_readonly("actions", &SparseModelState::getActions, "Get actions") + .def("__int__",&SparseModelState::getIndex) ; // SparseModelActions