14 eigenpy::StdPairConverter<std::pair<double, double>>::registration();
15 StdVectorPythonVisitor<std::vector<std::pair<double, double>>,
true>::expose(
16 "StdVec_StdPair_double");
18 bp::register_ptr_to_python<shared_ptr<Filter>>();
19 bp::class_<Filter>(
"Filter",
20 "A pair filter implementation to help make larger steps "
21 "during optimization.",
22 bp::init<double, double, std::size_t>(bp::args(
23 "self",
"beta",
"alpha_min",
"max_num_steps")))
24 .def(
"resetFilter", &Filter::resetFilter,
25 bp::args(
"self",
"beta",
"alpha_min",
"max_num_steps"),
26 "Reset the filter parameters.")
27 .def(
"run", &Filter::run, bp::args(
"self",
"phi",
"alpha_try"),
28 "Make a step and add pair if step accepted.")
29 .def(
"accept_pair", &Filter::accept_pair, bp::args(
"self",
"fpair"),
30 "Pair acceptance function.")
31 .def_readwrite(
"beta", &Filter::beta_,
32 "Distance parameter with other pairs in filter.")
33 .def_readwrite(
"alpha_min", &Filter::alpha_min_,
"Minimum alpha step.")
34 .def_readonly(
"filter_pairs_", &Filter::filter_pairs_,
35 "Filter pairs vector.");