CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Private Attributes
FKDPoint< TYPE, numberOfDimensions > Class Template Reference

#include <FKDPoint.h>

Public Member Functions

 FKDPoint ()
 
 FKDPoint (TYPE x, TYPE y, unsigned int id=0)
 
 FKDPoint (TYPE x, TYPE y, TYPE z, unsigned int id=0)
 
 FKDPoint (TYPE x, TYPE y, TYPE z, TYPE w, unsigned int id=0)
 
unsigned int getId () const
 
TYPE & operator[] (unsigned int const i)
 
TYPE const & operator[] (unsigned int const i) const
 
void setDimension (unsigned int i, const TYPE &value)
 
void setId (const unsigned int id)
 

Private Attributes

std::array< TYPE,
numberOfDimensions > 
theElements
 
unsigned int theId
 

Detailed Description

template<class TYPE, int numberOfDimensions>
class FKDPoint< TYPE, numberOfDimensions >

Definition at line 8 of file FKDPoint.h.

Constructor & Destructor Documentation

template<class TYPE, int numberOfDimensions>
FKDPoint< TYPE, numberOfDimensions >::FKDPoint ( )
inline

Definition at line 10 of file FKDPoint.h.

10 : theElements(), theId(0) {}
unsigned int theId
Definition: FKDPoint.h:51
std::array< TYPE, numberOfDimensions > theElements
Definition: FKDPoint.h:50
template<class TYPE, int numberOfDimensions>
FKDPoint< TYPE, numberOfDimensions >::FKDPoint ( TYPE  x,
TYPE  y,
unsigned int  id = 0 
)
inline

Definition at line 12 of file FKDPoint.h.

References gpuClustering::id, FKDPoint< TYPE, numberOfDimensions >::theElements, FKDPoint< TYPE, numberOfDimensions >::theId, x, and y.

12  {
13  static_assert(numberOfDimensions == 2, "FKDPoint number of arguments does not match the number of dimensions");
14 
15  theId = id;
16  theElements[0] = x;
17  theElements[1] = y;
18  }
uint16_t *__restrict__ id
unsigned int theId
Definition: FKDPoint.h:51
std::array< TYPE, numberOfDimensions > theElements
Definition: FKDPoint.h:50
template<class TYPE, int numberOfDimensions>
FKDPoint< TYPE, numberOfDimensions >::FKDPoint ( TYPE  x,
TYPE  y,
TYPE  z,
unsigned int  id = 0 
)
inline

Definition at line 20 of file FKDPoint.h.

References gpuClustering::id, FKDPoint< TYPE, numberOfDimensions >::theElements, FKDPoint< TYPE, numberOfDimensions >::theId, x, y, and z.

20  {
21  static_assert(numberOfDimensions == 3, "FKDPoint number of arguments does not match the number of dimensions");
22 
23  theId = id;
24  theElements[0] = x;
25  theElements[1] = y;
26  theElements[2] = z;
27  }
uint16_t *__restrict__ id
unsigned int theId
Definition: FKDPoint.h:51
std::array< TYPE, numberOfDimensions > theElements
Definition: FKDPoint.h:50
template<class TYPE, int numberOfDimensions>
FKDPoint< TYPE, numberOfDimensions >::FKDPoint ( TYPE  x,
TYPE  y,
TYPE  z,
TYPE  w,
unsigned int  id = 0 
)
inline

Definition at line 29 of file FKDPoint.h.

References gpuClustering::id, FKDPoint< TYPE, numberOfDimensions >::theElements, FKDPoint< TYPE, numberOfDimensions >::theId, w, x, y, and z.

29  {
30  static_assert(numberOfDimensions == 4, "FKDPoint number of arguments does not match the number of dimensions");
31  theId = id;
32  theElements[0] = x;
33  theElements[1] = y;
34  theElements[2] = z;
35  theElements[3] = w;
36  }
const double w
Definition: UKUtility.cc:23
uint16_t *__restrict__ id
unsigned int theId
Definition: FKDPoint.h:51
std::array< TYPE, numberOfDimensions > theElements
Definition: FKDPoint.h:50

Member Function Documentation

template<class TYPE, int numberOfDimensions>
unsigned int FKDPoint< TYPE, numberOfDimensions >::getId ( ) const
inline

Definition at line 47 of file FKDPoint.h.

References FKDPoint< TYPE, numberOfDimensions >::theId.

Referenced by FKDTree< TYPE, numberOfDimensions >::add_at_position().

47 { return theId; }
unsigned int theId
Definition: FKDPoint.h:51
template<class TYPE, int numberOfDimensions>
TYPE& FKDPoint< TYPE, numberOfDimensions >::operator[] ( unsigned int const  i)
inline

Definition at line 39 of file FKDPoint.h.

References mps_fire::i, and FKDPoint< TYPE, numberOfDimensions >::theElements.

39 { return theElements[i]; }
std::array< TYPE, numberOfDimensions > theElements
Definition: FKDPoint.h:50
template<class TYPE, int numberOfDimensions>
TYPE const& FKDPoint< TYPE, numberOfDimensions >::operator[] ( unsigned int const  i) const
inline

Definition at line 41 of file FKDPoint.h.

References mps_fire::i, and FKDPoint< TYPE, numberOfDimensions >::theElements.

41 { return theElements[i]; }
std::array< TYPE, numberOfDimensions > theElements
Definition: FKDPoint.h:50
template<class TYPE, int numberOfDimensions>
void FKDPoint< TYPE, numberOfDimensions >::setDimension ( unsigned int  i,
const TYPE &  value 
)
inline

Definition at line 43 of file FKDPoint.h.

References mps_fire::i, FKDPoint< TYPE, numberOfDimensions >::theElements, and relativeConstraints::value.

43 { theElements[i] = value; }
std::array< TYPE, numberOfDimensions > theElements
Definition: FKDPoint.h:50
template<class TYPE, int numberOfDimensions>
void FKDPoint< TYPE, numberOfDimensions >::setId ( const unsigned int  id)
inline

Definition at line 45 of file FKDPoint.h.

References gpuClustering::id, and FKDPoint< TYPE, numberOfDimensions >::theId.

45 { theId = id; }
uint16_t *__restrict__ id
unsigned int theId
Definition: FKDPoint.h:51

Member Data Documentation

template<class TYPE, int numberOfDimensions>
std::array<TYPE, numberOfDimensions> FKDPoint< TYPE, numberOfDimensions >::theElements
private
template<class TYPE, int numberOfDimensions>
unsigned int FKDPoint< TYPE, numberOfDimensions >::theId
private