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))
+ ;
}