From cf617a8bf5b9701dad69b1d47b449654ab32453c Mon Sep 17 00:00:00 2001 From: Marc Glisse Date: Tue, 26 May 2020 18:34:12 +0200 Subject: rename function to hierarchy --- src/python/gudhi/clustering/_tomato.cc | 6 +++--- src/python/gudhi/clustering/tomato.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src/python/gudhi/clustering') diff --git a/src/python/gudhi/clustering/_tomato.cc b/src/python/gudhi/clustering/_tomato.cc index ce01834a..f2e73ed6 100644 --- a/src/python/gudhi/clustering/_tomato.cc +++ b/src/python/gudhi/clustering/_tomato.cc @@ -47,8 +47,8 @@ struct Merge { }; template -auto tomato(Point_index num_points, Neighbors const& neighbors, Density const& density, Order const& order, - ROrder const& rorder) { +auto hierarchy(Point_index num_points, Neighbors const& neighbors, Density const& density, Order const& order, + ROrder const& rorder) { // point index --> index of raw cluster it belongs to std::vector raw_cluster; raw_cluster.reserve(num_points); @@ -302,7 +302,7 @@ auto plaf(py::array_t ngb, py::a #endif PYBIND11_MODULE(_tomato, m) { m.doc() = "Internals of tomato clustering"; - m.def("doit", &plouf, "does the clustering"); + m.def("hierarchy", &hierarchy, "does the clustering"); // m.def("doit2", &plaf, "does the clustering faster"); m.def("merge", &merge, "merge clusters"); } diff --git a/src/python/gudhi/clustering/tomato.py b/src/python/gudhi/clustering/tomato.py index 62fac8db..d5c5daac 100644 --- a/src/python/gudhi/clustering/tomato.py +++ b/src/python/gudhi/clustering/tomato.py @@ -229,7 +229,7 @@ class Tomato: self.neighbors_[j].add(i) self.weights_ = weights - self.leaf_labels_, self.children_, self.diagram_, self.max_weight_per_cc_ = doit(self.neighbors_, weights) + self.leaf_labels_, self.children_, self.diagram_, self.max_weight_per_cc_ = hierarchy(self.neighbors_, weights) self.n_leaves_ = len(self.max_weight_per_cc_) + len(self.children_) assert self.leaf_labels_.max() + 1 == len(self.max_weight_per_cc_) + len(self.children_) # TODO: deduplicate this code with the setters below -- cgit v1.2.3