Mantid
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
Mantid::Kernel::NNDataPoints Class Reference

NNDataPoints is a thin RAII wrapper class around the ANNpointArray type. More...

#include <NearestNeighbours.h>

Public Member Functions

ANNcoord * mutablePoint (const int i)
 Access a raw point in the collection of points. More...
 
 NNDataPoints (const int nPts, const int nElems)
 Construct a new set of data points. More...
 
ANNpointArray rawData ()
 Return a handle to the raw ANNpointArray wrapped by this class. More...
 
 ~NNDataPoints ()
 

Private Attributes

ANNpointArray m_data
 Array of points for use with NN search. More...
 
const int m_nPts
 Number of points stored. More...
 

Detailed Description

NNDataPoints is a thin RAII wrapper class around the ANNpointArray type.

This takes care of the proper allocation and deallocation of memory.

Definition at line 41 of file NearestNeighbours.h.

Constructor & Destructor Documentation

◆ NNDataPoints()

Mantid::Kernel::NNDataPoints::NNDataPoints ( const int  nPts,
const int  nElems 
)
inline

Construct a new set of data points.

Parameters
nPts:: the number of data points
nElems:: the number of elements for each point

Definition at line 48 of file NearestNeighbours.h.

References m_data, and m_nPts.

◆ ~NNDataPoints()

Mantid::Kernel::NNDataPoints::~NNDataPoints ( )
inline

Definition at line 50 of file NearestNeighbours.h.

References m_data.

Member Function Documentation

◆ mutablePoint()

ANNcoord * Mantid::Kernel::NNDataPoints::mutablePoint ( const int  i)
inline

Access a raw point in the collection of points.

This will check the index used is within bounds and return nullptr if outside of those bounds

Parameters
i:: the index of the point to return a handle to
Returns
handle to a single point in the collection of points

Definition at line 66 of file NearestNeighbours.h.

References m_data, and m_nPts.

◆ rawData()

ANNpointArray Mantid::Kernel::NNDataPoints::rawData ( )
inline

Return a handle to the raw ANNpointArray wrapped by this class.

Returns
handle to the raw ANNpointArray

Definition at line 56 of file NearestNeighbours.h.

References m_data.

Member Data Documentation

◆ m_data

ANNpointArray Mantid::Kernel::NNDataPoints::m_data
private

Array of points for use with NN search.

Definition at line 77 of file NearestNeighbours.h.

Referenced by mutablePoint(), NNDataPoints(), rawData(), and ~NNDataPoints().

◆ m_nPts

const int Mantid::Kernel::NNDataPoints::m_nPts
private

Number of points stored.

Definition at line 75 of file NearestNeighbours.h.

Referenced by mutablePoint(), and NNDataPoints().


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