matches.cpp
Go to the documentation of this file.
1 #include "matches.h"
2 
3 namespace python
4 {
5  namespace pointmatcher
6  {
7  void pybindMatches(py::class_<PM>& p_class)
8  {
9  py::class_<Matches> pyMatches(p_class, "Matches");
10 
11  pyMatches.doc() = R"pbdoc(
12 Result of the data-association step (Matcher::findClosests), before outlier rejection.
13 
14 This class holds a list of associated reference identifiers, along with the corresponding \e squared distance, for all points in the reading.
15 A single point in the reading can have one or multiple matches.
16 )pbdoc";
17 
18  using Dists = Matches::Dists;
19  using Ids = Matches::Ids;
20 
21  pyMatches
22 // .def_readonly_static("InvalidId", &Matches::InvalidId, "In case of too few matches the ids are filled with InvalidId") FIXME
23 // .def_readonly_static("InvalidDist", &Matches::InvalidDist, "In case of too few matches the dists are filled with InvalidDist") FIXME
24 
25  .def(py::init<>()).def(py::init<const Dists&, const Ids>(), py::arg("dists"), py::arg("ids"))
26  .def(py::init<const int, const int>(), py::arg("knn"), py::arg("pointsCount"))
27 
28  .def_readwrite("dists", &Matches::dists, "squared distances to closest points")
29  .def_readwrite("ids", &Matches::ids, "identifiers of closest points")
30 
31  .def("getDistsQuantile", &Matches::getDistsQuantile, py::arg("quantile"))
32  .def("getMedianAbsDeviation", &Matches::getMedianAbsDeviation)
33  .def("getStandardDeviation", &Matches::getStandardDeviation);
34  }
35  }
36 }
python
Definition: add_descriptor.cpp:5
python::pointmatcher::pybindMatches
void pybindMatches(py::class_< PM > &p_class)
Definition: matches.cpp:7
matches.h


libpointmatcher
Author(s):
autogenerated on Mon Sep 16 2024 02:24:09