From cb8c309d5d3063a2d6ef435fce285b8ea5932c16 Mon Sep 17 00:00:00 2001 From: Sebastian Junges Date: Sun, 20 Aug 2017 21:52:27 +0200 Subject: [PATCH] Constraint collector: general constructor --- src/core/analysis.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/core/analysis.cpp b/src/core/analysis.cpp index e7ab72e..ba7dfc9 100644 --- a/src/core/analysis.cpp +++ b/src/core/analysis.cpp @@ -7,7 +7,9 @@ void define_graph_constraints(py::module& m) { // ConstraintCollector py::class_, std::shared_ptr>>(m, "ConstraintCollector", "Collector for constraints on parametric Markov chains") - .def(py::init>(), "model") + .def("__init__", [](storm::analysis::ConstraintCollector &instance, storm::models::sparse::Model const& model) -> void { + new (&instance) storm::analysis::ConstraintCollector(model); + }, py::arg("model")) .def_property_readonly("wellformed_constraints", &storm::analysis::ConstraintCollector::getWellformedConstraints, "Get the constraints ensuring a wellformed model") .def_property_readonly("graph_preserving_constraints", &storm::analysis::ConstraintCollector::getGraphPreservingConstraints, "Get the constraints ensuring the graph is preserved") ;