Open3D (C++ API)  0.18.0+5c982c7
Public Member Functions | Data Fields | Protected Attributes
open3d::core::nns::FixedRadiusIndex Class Reference

FixedRadiusIndex for nearest neighbor range search. More...

#include <FixedRadiusIndex.h>

Inheritance diagram for open3d::core::nns::FixedRadiusIndex:
open3d::core::nns::NNSIndex

Public Member Functions

 FixedRadiusIndex ()
 Default Constructor. More...
 
 FixedRadiusIndex (const Tensor &dataset_points, double radius)
 Parameterized Constructor. More...
 
 FixedRadiusIndex (const Tensor &dataset_points, double radius, const Dtype &index_dtype)
 
 ~FixedRadiusIndex ()
 
 FixedRadiusIndex (const FixedRadiusIndex &)=delete
 
FixedRadiusIndexoperator= (const FixedRadiusIndex &)=delete
 
bool SetTensorData (const Tensor &dataset_points, const Dtype &index_dtype=core::Int64) override
 
bool SetTensorData (const Tensor &dataset_points, double radius, const Dtype &index_dtype=core::Int64) override
 
bool SetTensorData (const Tensor &dataset_points, const Tensor &points_row_splits, double radius, const Dtype &index_dtype=core::Int64)
 
std::pair< Tensor, TensorSearchKnn (const Tensor &query_points, int knn) const override
 
std::tuple< Tensor, Tensor, TensorSearchRadius (const Tensor &query_points, const Tensor &radii, bool sort=true) const override
 
std::tuple< Tensor, Tensor, TensorSearchRadius (const Tensor &query_points, double radius, bool sort=true) const override
 
std::tuple< Tensor, Tensor, TensorSearchRadius (const Tensor &query_points, const Tensor &queries_row_splits, double radius, bool sort=true) const
 
std::tuple< Tensor, Tensor, TensorSearchHybrid (const Tensor &query_points, double radius, int max_knn) const override
 
std::tuple< Tensor, Tensor, TensorSearchHybrid (const Tensor &query_points, const Tensor &queries_row_splits, double radius, int max_knn) const
 
- Public Member Functions inherited from open3d::core::nns::NNSIndex
 NNSIndex ()
 Default Constructor. More...
 
virtual ~NNSIndex ()
 
 NNSIndex (const NNSIndex &)=delete
 
NNSIndexoperator= (const NNSIndex &)=delete
 
int GetDimension () const
 
size_t GetDatasetSize () const
 
Dtype GetDtype () const
 
Device GetDevice () const
 
Dtype GetIndexDtype () const
 

Data Fields

const double hash_table_size_factor = 1.0 / 32
 
const int64_t max_hash_tabls_size = 33554432
 

Protected Attributes

Tensor points_row_splits_
 
Tensor hash_table_splits_
 
Tensor hash_table_cell_splits_
 
Tensor hash_table_index_
 
- Protected Attributes inherited from open3d::core::nns::NNSIndex
Tensor dataset_points_
 
Dtype index_dtype_
 

Detailed Description

FixedRadiusIndex for nearest neighbor range search.

Constructor & Destructor Documentation

◆ FixedRadiusIndex() [1/4]

open3d::core::nns::FixedRadiusIndex::FixedRadiusIndex ( )

Default Constructor.

◆ FixedRadiusIndex() [2/4]

open3d::core::nns::FixedRadiusIndex::FixedRadiusIndex ( const Tensor dataset_points,
double  radius 
)

Parameterized Constructor.

Parameters
dataset_pointsProvides a set of data points as Tensor for KDTree construction.

◆ FixedRadiusIndex() [3/4]

open3d::core::nns::FixedRadiusIndex::FixedRadiusIndex ( const Tensor dataset_points,
double  radius,
const Dtype index_dtype 
)

◆ ~FixedRadiusIndex()

open3d::core::nns::FixedRadiusIndex::~FixedRadiusIndex ( )

◆ FixedRadiusIndex() [4/4]

open3d::core::nns::FixedRadiusIndex::FixedRadiusIndex ( const FixedRadiusIndex )
delete

Member Function Documentation

◆ operator=()

FixedRadiusIndex& open3d::core::nns::FixedRadiusIndex::operator= ( const FixedRadiusIndex )
delete

◆ SearchHybrid() [1/2]

std::tuple< Tensor, Tensor, Tensor > open3d::core::nns::FixedRadiusIndex::SearchHybrid ( const Tensor query_points,
const Tensor queries_row_splits,
double  radius,
int  max_knn 
) const

◆ SearchHybrid() [2/2]

std::tuple< Tensor, Tensor, Tensor > open3d::core::nns::FixedRadiusIndex::SearchHybrid ( const Tensor query_points,
double  radius,
int  max_knn 
) const
overridevirtual

Perform hybrid search.

Parameters
query_pointsQuery points. Must be 2D, with shape {n, d}.
radiusRadius.
max_knnMaximum number of neighbor to search per query point.
Returns
Tuple of Tensors, (indices, distances, counts):
  • indices: Tensor of shape {n, knn}, with dtype Int32.
  • distances: Tensor of shape {n, knn}, with dtype Float32.
  • counts: Tensor of shape {n, 1}, with dtype Int32.

Implements open3d::core::nns::NNSIndex.

◆ SearchKnn()

std::pair<Tensor, Tensor> open3d::core::nns::FixedRadiusIndex::SearchKnn ( const Tensor query_points,
int  knn 
) const
inlineoverridevirtual

Perform K nearest neighbor search.

Parameters
query_pointsQuery points. Must be 2D, with shape {n, d}, same dtype with dataset_points.
knnNumber of nearest neighbor to search.
Returns
Pair of Tensors: (indices, distances):
  • indices: Tensor of shape {n, knn}, with dtype Int32.
  • distances: Tensor of shape {n, knn}, same dtype with dataset_points.

Implements open3d::core::nns::NNSIndex.

◆ SearchRadius() [1/3]

std::tuple< Tensor, Tensor, Tensor > open3d::core::nns::FixedRadiusIndex::SearchRadius ( const Tensor query_points,
const Tensor queries_row_splits,
double  radius,
bool  sort = true 
) const

◆ SearchRadius() [2/3]

std::tuple<Tensor, Tensor, Tensor> open3d::core::nns::FixedRadiusIndex::SearchRadius ( const Tensor query_points,
const Tensor radii,
bool  sort = true 
) const
inlineoverridevirtual

Perform radius search with multiple radii.

Parameters
query_pointsQuery points. Must be 2D, with shape {n, d}, same dtype with dataset_points.
radiilist of radius. Must be 1D, with shape {n, }.
Returns
Tuple of Tensors: (indices, distances, num_neighbors):
  • indices: Tensor of shape {total_num_neighbors,}, dtype Int32.
  • distances: Tensor of shape {total_num_neighbors,}, same dtype with dataset_points.
  • num_neighbors: Tensor of shape {n,}, dtype Int32.

Implements open3d::core::nns::NNSIndex.

◆ SearchRadius() [3/3]

std::tuple< Tensor, Tensor, Tensor > open3d::core::nns::FixedRadiusIndex::SearchRadius ( const Tensor query_points,
double  radius,
bool  sort = true 
) const
overridevirtual

Perform radius search.

Parameters
query_pointsQuery points. Must be 2D, with shape {n, d}, same dtype with dataset_points.
radiusRadius.
Returns
Tuple of Tensors, (indices, distances, num_neighbors):
  • indices: Tensor of shape {total_num_neighbors,}, dtype Int32.
  • distances: Tensor of shape {total_num_neighbors,}, same dtype with dataset_points.
  • num_neighbors: Tensor of shape {n}, dtype Int32.

Implements open3d::core::nns::NNSIndex.

◆ SetTensorData() [1/3]

bool open3d::core::nns::FixedRadiusIndex::SetTensorData ( const Tensor dataset_points,
const Dtype index_dtype = core::Int64 
)
inlineoverridevirtual

Set the data for the nearest neighbor search.

Parameters
dataset_pointsDataset points for KDTree construction. Must be 2D, with shape {n, d}.
Returns
Returns true if the construction success, otherwise false.

Implements open3d::core::nns::NNSIndex.

◆ SetTensorData() [2/3]

bool open3d::core::nns::FixedRadiusIndex::SetTensorData ( const Tensor dataset_points,
const Tensor points_row_splits,
double  radius,
const Dtype index_dtype = core::Int64 
)

◆ SetTensorData() [3/3]

bool open3d::core::nns::FixedRadiusIndex::SetTensorData ( const Tensor dataset_points,
double  radius,
const Dtype index_dtype = core::Int64 
)
overridevirtual

Set the data for the nearest neighbor search.

Parameters
dataset_pointsDataset points for KDTree construction. Must be 2D, with shape {n, d}.
Returns
Returns true if the construction success, otherwise false.

Implements open3d::core::nns::NNSIndex.

Field Documentation

◆ hash_table_cell_splits_

Tensor open3d::core::nns::FixedRadiusIndex::hash_table_cell_splits_
protected

◆ hash_table_index_

Tensor open3d::core::nns::FixedRadiusIndex::hash_table_index_
protected

◆ hash_table_size_factor

const double open3d::core::nns::FixedRadiusIndex::hash_table_size_factor = 1.0 / 32

◆ hash_table_splits_

Tensor open3d::core::nns::FixedRadiusIndex::hash_table_splits_
protected

◆ max_hash_tabls_size

const int64_t open3d::core::nns::FixedRadiusIndex::max_hash_tabls_size = 33554432

◆ points_row_splits_

Tensor open3d::core::nns::FixedRadiusIndex::points_row_splits_
protected

The documentation for this class was generated from the following files: