provide python interpreter for mussa qui via a seperate thread
[mussa.git] / py / nway_paths.cpp
index 1ba44500a099bbee6982773b558bc20d4609a4d5..6ca2f20e0a7ecce7507c49f15045ca61be353faa 100644 (file)
@@ -5,8 +5,28 @@ namespace py = boost::python;
 
 void export_nway_paths()
 {
-  py::class_<NwayPaths>("NwayPaths")
+  /*py::class_<NwayPaths::ConservedPaths>("ConservedPaths")
+    .def("__len__", &NwayPaths::ConservedPaths::size, "return length of paths")
+    .def("__contains__", &std_item<NwayPaths::ConservedPaths>::in)
+    .def("__iter__", py::iterator<NwayPaths::ConservedPaths>())
+    .def("clear", &NwayPaths::ConservedPaths::clear, "remove all the paths")
+    .def("append", &std_item<NwayPaths::ConservedPaths>::add,
+        py::with_custodian_and_ward<1,2>()) // to let container keep value
+    .def("__getitem__", &std_item<NwayPaths::ConservedPaths>::get,
+        py::return_value_policy<py::copy_non_const_reference>())
+    .def("__setitem__", &std_item<NwayPaths::ConservedPaths>::set,
+        py::with_custodian_and_ward<1,2>()) // to let container keep value
+    .def("__delitem__", &std_item<NwayPaths::ConservedPaths>::del)
+  ;*/
+   py::class_<NwayPaths>("NwayPaths")
+    .def("__len__", &NwayPaths::sequence_count)
+    .def("clear", &NwayPaths::clear, "remove all paths")
+    .add_property("threshold", &NwayPaths::get_threshold, "Get hard threshold")
+    .add_property("soft_threshold", &NwayPaths::get_soft_threshold, &NwayPaths::set_soft_threshold)
+    .add_property("window_size", &NwayPaths::get_window)
     .add_property("pathz", py::range(&NwayPaths::pbegin, &NwayPaths::pend))
-    .add_property("refinedPathz", py::range(&NwayPaths::rpbegin, &NwayPaths::rpend)) ;
+    .add_property("refinedPathz", py::range(&NwayPaths::rpbegin, &NwayPaths::rpend))
+   ;
 }