Ponca  6f9f1b59d7c8c4654a710cfcef7342f4f5c79ba1
Point Cloud Analysis library
Loading...
Searching...
No Matches
Ponca::NeighborGraphBase< _Traits > Class Template Reference
+ Inheritance diagram for Ponca::NeighborGraphBase< _Traits >:
+ Collaboration diagram for Ponca::NeighborGraphBase< _Traits >:

Public Types

using Traits = _Traits
 Alias to the Traits type

 
using DataPoint = typename Traits::DataPoint
 DataPoint given by user via Traits

 
using Scalar = typename DataPoint::Scalar
 Scalar given by user via DataPoint

 
using VectorType = typename DataPoint::VectorType
 VectorType given by user via DataPoint

 
using IndexType = typename Traits::IndexType
 Type used to index points into the PointContainer.
 
using PointContainer = typename Traits::PointContainer
 Container for DataPoint used inside the KdTree

 
using PointContainerConstRef = typename Traits::PointContainerConstRef
 Container for DataPoint used inside the KdTree

 
using IndexContainer = typename Traits::IndexContainer
 Container for indices used inside the KdTree

 
using IndexContainerRef = typename Traits::IndexContainerRef
 Ref type to index container.
 
- Public Types inherited from Ponca::StaticNeighborGraphBase< _Traits >
using Traits = _Traits
 Alias to the Traits type

 
using DataPoint = typename Traits::DataPoint
 DataPoint given by user via Traits

 
using Scalar = typename DataPoint::Scalar
 Scalar given by user via DataPoint

 
using VectorType = typename DataPoint::VectorType
 VectorType given by user via DataPoint

 
using IndexType = typename Traits::IndexType
 Type used to index points into the PointContainer.
 
using PointContainer = typename Traits::PointContainer
 Container for DataPoint used inside the KdTree

 
using PointContainerConstRef = typename Traits::PointContainerConstRef
 Container for DataPoint used inside the KdTree

 
using IndexContainer = typename Traits::IndexContainer
 Container for indices used inside the KdTree

 
using IndexContainerRef = typename Traits::IndexContainerRef
 Ref type to index container.
 
using Base = AbstractNeighborGraph< Traits, NeighborGraphBuffer, NeighborGraphOneConnectedQuery< StaticNeighborGraphBase< Traits > >, NeighborGraphRangeQuery< StaticNeighborGraphBase< Traits > > >
 
using Buffers = typename Base::Buffers
 
- Public Types inherited from Ponca::AbstractNeighborGraph< _Traits, NeighborGraphBuffer, NeighborGraphOneConnectedQuery< StaticNeighborGraphBase< _Traits > >, NeighborGraphRangeQuery< StaticNeighborGraphBase< _Traits > > >
using Traits = _Traits
 Alias to the Traits type

 
using DataPoint = typename Traits::DataPoint
 DataPoint given by user via Traits

 
using Scalar = typename DataPoint::Scalar
 Scalar given by user via DataPoint

 
using VectorType = typename DataPoint::VectorType
 VectorType given by user via DataPoint

 
using IndexType = typename Traits::IndexType
 Type used to index points into the PointContainer.
 
using PointContainer = typename Traits::PointContainer
 Container for DataPoint used inside the KdTree

 
using PointContainerConstRef = typename Traits::PointContainerConstRef
 Container for DataPoint used inside the KdTree

 
using IndexContainer = typename Traits::IndexContainer
 Container for indices used inside the KdTree

 
using IndexContainerRef = typename Traits::IndexContainerRef
 Ref type to index container.
 
using OneConnectedIndexQuery = NeighborGraphOneConnectedQuery< StaticNeighborGraphBase< _Traits > >
 
using RangeIndexQuery = NeighborGraphRangeQuery< StaticNeighborGraphBase< _Traits > >
 
using Buffers = NeighborGraphBuffer< Traits >
 

Public Member Functions

template<typename KdTreeTraits >
 NeighborGraphBase (const KdTreeBase< KdTreeTraits > &_kdtree, const Scalar range)
 Build a neighbor graph by connecting all points using Euclidean range queries: two points.
 
- Public Member Functions inherited from Ponca::StaticNeighborGraphBase< _Traits >
 StaticNeighborGraphBase (const Buffers &_bufs)
 
int k (int vId=0) const
 [Neighbor Graph Accessors]
 
int beginId (int vId) const
 Index of the beginning of the neighborhood range (see storing convention in NeighborGraphBuffer)
 
int endId (int vId) const
 Index of the end of the neighborhood range (see storing convention in NeighborGraphBuffer)
 
- Public Member Functions inherited from Ponca::AbstractNeighborGraph< _Traits, NeighborGraphBuffer, NeighborGraphOneConnectedQuery< StaticNeighborGraphBase< _Traits > >, NeighborGraphRangeQuery< StaticNeighborGraphBase< _Traits > > >
 AbstractNeighborGraph (const Buffers &_bufs)
 Constructor that allows the use of prebuilt graph containers.
 
IndexType edgeCount () const
 Get the number of connection edges in the graph.
 
IndexType pointCount () const
 Get the number of points.
 
PointContainer points () const
 Get the internal point container.
 
IndexContainer edges () const
 Get the internal index container.
 
const Buffersbuffers () const
 Get access to the internal buffer, for instance to prepare GPU binding.
 
OneConnectedIndexQuery oneConnectedNeighbors (int index=0) const
 Provides a Query object to iterate over the vertices that are directly connected to the query point.
 
RangeIndexQuery rangeNeighbors (int index, Scalar r) const
 Provides a Query object to iterate over the neighbors that are inside a given radius.
 
RangeIndexQuery rangeNeighborsIndexQuery () const
 Convenience function to return an empty mutable range query.
 

Additional Inherited Members

- Protected Member Functions inherited from Ponca::AbstractNeighborGraph< _Traits, NeighborGraphBuffer, NeighborGraphOneConnectedQuery< StaticNeighborGraphBase< _Traits > >, NeighborGraphRangeQuery< StaticNeighborGraphBase< _Traits > > >
const IndexTypegetIndexPtr () const
 Accessor used by friend classes (queries) to get const access to the indices whatever the buffer type.
 
IndexTypegetIndexPtr ()
 Accessor used by friend classes (queries) to get access to the indices whatever the buffer type.
 
- Protected Attributes inherited from Ponca::AbstractNeighborGraph< _Traits, NeighborGraphBuffer, NeighborGraphOneConnectedQuery< StaticNeighborGraphBase< _Traits > >, NeighborGraphRangeQuery< StaticNeighborGraphBase< _Traits > > >
Buffers m_bufs
 Buffers used to store the KnnGraph.
 

Detailed Description

template<typename _Traits>
class Ponca::NeighborGraphBase< _Traits >

Definition at line 84 of file neighborGraph.h.

Member Typedef Documentation

◆ DataPoint

DataPoint given by user via Traits

Definition at line 87 of file neighborGraph.h.

◆ IndexContainer

template<typename _Traits >
using Ponca::NeighborGraphBase< _Traits >::IndexContainer = typename Traits::IndexContainer

Container for indices used inside the KdTree

Definition at line 87 of file neighborGraph.h.

◆ IndexContainerRef

template<typename _Traits >
using Ponca::NeighborGraphBase< _Traits >::IndexContainerRef = typename Traits::IndexContainerRef

Ref type to index container.

Definition at line 87 of file neighborGraph.h.

◆ IndexType

template<typename _Traits >
using Ponca::NeighborGraphBase< _Traits >::IndexType = typename Traits::IndexType

Type used to index points into the PointContainer.

Definition at line 87 of file neighborGraph.h.

◆ PointContainer

template<typename _Traits >
using Ponca::NeighborGraphBase< _Traits >::PointContainer = typename Traits::PointContainer

Container for DataPoint used inside the KdTree

Definition at line 87 of file neighborGraph.h.

◆ PointContainerConstRef

template<typename _Traits >
using Ponca::NeighborGraphBase< _Traits >::PointContainerConstRef = typename Traits::PointContainerConstRef

Container for DataPoint used inside the KdTree

Definition at line 87 of file neighborGraph.h.

◆ Scalar

template<typename _Traits >
using Ponca::NeighborGraphBase< _Traits >::Scalar = typename DataPoint::Scalar

Scalar given by user via DataPoint

Definition at line 87 of file neighborGraph.h.

◆ Traits

Alias to the Traits type

Definition at line 87 of file neighborGraph.h.

◆ VectorType

template<typename _Traits >
using Ponca::NeighborGraphBase< _Traits >::VectorType = typename DataPoint::VectorType

VectorType given by user via DataPoint

Definition at line 87 of file neighborGraph.h.

Constructor & Destructor Documentation

◆ NeighborGraphBase()

template<typename _Traits >
template<typename KdTreeTraits >
Ponca::NeighborGraphBase< _Traits >::NeighborGraphBase ( const KdTreeBase< KdTreeTraits > &  _kdtree,
const Scalar  range 
)
inline

Build a neighbor graph by connecting all points using Euclidean range queries: two points.

\[\mathbf{p,q}\]

are connected if

\[\mathbf{p}-\mathbf{q}<\text{range}\]

Note
Each point might have a different number of neighbors
Empty neighborhood are not checked
Parameters
_kdtreeReference to the KdTree
rangeDistance threshold used to connect points
Warning
Stores a const reference to kdtree.point_data()
KdTreeTraits compatibility is checked with static assertion

Definition at line 106 of file neighborGraph.h.