From 3186b2d14ee118c13db801dd6bbd85d038bca43d Mon Sep 17 00:00:00 2001 From: Mikhail Kiselyov Date: Sun, 12 Nov 2023 15:47:18 +0300 Subject: [PATCH] remove pose_number optionality --- octreelib/octree_manager/octree_manager.py | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/octreelib/octree_manager/octree_manager.py b/octreelib/octree_manager/octree_manager.py index 7ad0325..de78e12 100644 --- a/octreelib/octree_manager/octree_manager.py +++ b/octreelib/octree_manager/octree_manager.py @@ -113,24 +113,18 @@ def n_points(self, pose_number: Optional[int] = None) -> int: return sum(octree.n_points() for octree in self._octrees.values()) return self._octrees.get(pose_number, self._empty_octree).n_points - def n_leaves(self, pose_number: Optional[int] = None) -> int: + def n_leaves(self, pose_number: int) -> int: """ :param pose_number: Desired pose number. :return: Number of leaves which store points for this pose. """ - if pose_number is None: - raise NotImplementedError - # return sum(octree.n_leaves for octree in self._octrees.values()) return self._octrees.get(pose_number, self._empty_octree).n_leaves - def n_nodes(self, pose_number: Optional[int] = None) -> int: + def n_nodes(self, pose_number: int) -> int: """ :param pose_number: Desired pose number. :return: Number of nodes (both leaves and not) which store points for this pose. """ - if pose_number is None: - raise NotImplementedError - # return sum(octree.n_nodes for octree in self._octrees.values()) return self._octrees.get(pose_number, self._empty_octree).n_nodes def insert_points(self, pose_number: int, points: PointCloud):