Open3D (C++ API)  0.19.0
Loading...
Searching...
No Matches
open3d::core::nns::NanoFlannIndex Class Reference

#include <NanoFlannIndex.h>

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

Public Member Functions

 NanoFlannIndex ()
 Default Constructor.
 NanoFlannIndex (const Tensor &dataset_points)
 Parameterized Constructor.
 NanoFlannIndex (const Tensor &dataset_points, const Dtype &index_dtype)
 ~NanoFlannIndex ()
 NanoFlannIndex (const NanoFlannIndex &)=delete
NanoFlannIndexoperator= (const NanoFlannIndex &)=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
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, TensorSearchHybrid (const Tensor &query_points, double radius, int max_knn) const override
Public Member Functions inherited from open3d::core::nns::NNSIndex
 NNSIndex ()
 Default Constructor.
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

Protected Attributes

std::unique_ptr< NanoFlannIndexHolderBaseholder_
Protected Attributes inherited from open3d::core::nns::NNSIndex
Tensor dataset_points_
Dtype index_dtype_

Constructor & Destructor Documentation

◆ NanoFlannIndex() [1/4]

open3d::core::nns::NanoFlannIndex::NanoFlannIndex ( )

Default Constructor.

◆ NanoFlannIndex() [2/4]

open3d::core::nns::NanoFlannIndex::NanoFlannIndex ( const Tensor & dataset_points)

Parameterized Constructor.

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

◆ NanoFlannIndex() [3/4]

open3d::core::nns::NanoFlannIndex::NanoFlannIndex ( const Tensor & dataset_points,
const Dtype & index_dtype )

◆ ~NanoFlannIndex()

open3d::core::nns::NanoFlannIndex::~NanoFlannIndex ( )

◆ NanoFlannIndex() [4/4]

open3d::core::nns::NanoFlannIndex::NanoFlannIndex ( const NanoFlannIndex & )
delete

Member Function Documentation

◆ operator=()

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

◆ SearchHybrid()

std::tuple< Tensor, Tensor, Tensor > open3d::core::nns::NanoFlannIndex::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: Counts of neighbour for each query points. [Tensor of shape {n}, with dtype Int32].

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

◆ SearchKnn()

std::pair< Tensor, Tensor > open3d::core::nns::NanoFlannIndex::SearchKnn ( const Tensor & query_points,
int knn ) const
overridevirtual

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/2]

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

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, counts):
  • indices: Tensor of shape {total_num_neighbors,}, dtype Int32.
  • distances: Tensor of shape {total_num_neighbors,}, same dtype with dataset_points.
  • counts: Tensor of shape {n,}, dtype Int64.

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

◆ SearchRadius() [2/2]

std::tuple< Tensor, Tensor, Tensor > open3d::core::nns::NanoFlannIndex::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, counts):
  • indices: Tensor of shape {total_num_neighbors,}, dtype Int32.
  • distances: Tensor of shape {total_num_neighbors,}, same dtype with dataset_points.
  • counts: Tensor of shape {n}, dtype Int64.

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

◆ SetTensorData() [1/2]

bool open3d::core::nns::NanoFlannIndex::SetTensorData ( const Tensor & dataset_points,
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.

◆ SetTensorData() [2/2]

bool open3d::core::nns::NanoFlannIndex::SetTensorData ( const Tensor & dataset_points,
double radius,
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.

Field Documentation

◆ holder_

std::unique_ptr<NanoFlannIndexHolderBase> open3d::core::nns::NanoFlannIndex::holder_
protected

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