#include "state.h" template void define_state(py::module& m, std::string const& vtSuffix) { // SparseModelStates py::class_>(m, ("Sparse" + vtSuffix + "ModelStates").c_str(), "States in sparse model") .def("__getitem__", &SparseModelStates::getState) .def("__len__", &SparseModelStates::getSize) ; // SparseModelState py::class_>(m, ("Sparse" + vtSuffix + "ModelState").c_str(), "State in sparse 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 py::class_>(m, ("Sparse" + vtSuffix + "ModelActions").c_str(), "Actions for state in sparse model") .def("__getitem__", &SparseModelActions::getAction) .def("__len__", &SparseModelActions::getSize) ; // SparseModelAction py::class_>(m, ("Sparse" + vtSuffix + "ModelAction").c_str(), "Action for state in sparse model") .def("__str__", &SparseModelAction::toString) .def_property_readonly("id", &SparseModelAction::getIndex, "Id") .def_property_readonly("transitions", &SparseModelAction::getTransitions, "Get transitions") ; } template void define_state(py::module& m, std::string const& vtSuffix); template void define_state(py::module& m, std::string const& vtSuffix); template void define_state(py::module& m, std::string const& vtSuffix);