Skip to content

Commit

Permalink
remove pose_number optionality
Browse files Browse the repository at this point in the history
  • Loading branch information
true-real-michael committed Nov 12, 2023
1 parent 9b61e4f commit 3186b2d
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions octreelib/octree_manager/octree_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 3186b2d

Please sign in to comment.