CMS 3D CMS Logo

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 12 of file FKDPoint.h.

12  :
13  theElements(), theId(0)
14  {
15  }
unsigned int theId
Definition: FKDPoint.h:74
std::array< TYPE, numberOfDimensions > theElements
Definition: FKDPoint.h:73
template<class TYPE, int numberOfDimensions>
FKDPoint< TYPE, numberOfDimensions >::FKDPoint ( TYPE  x,
TYPE  y,
unsigned int  id = 0 
)
inline

Definition at line 17 of file FKDPoint.h.

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

18  {
19  static_assert(numberOfDimensions==2,"FKDPoint number of arguments does not match the number of dimensions");
20 
21  theId = id;
22  theElements[0] = x;
23  theElements[1] = y;
24  }
unsigned int theId
Definition: FKDPoint.h:74
std::array< TYPE, numberOfDimensions > theElements
Definition: FKDPoint.h:73
template<class TYPE, int numberOfDimensions>
FKDPoint< TYPE, numberOfDimensions >::FKDPoint ( TYPE  x,
TYPE  y,
TYPE  z,
unsigned int  id = 0 
)
inline

Definition at line 26 of file FKDPoint.h.

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

27  {
28  static_assert(numberOfDimensions==3,"FKDPoint number of arguments does not match the number of dimensions");
29 
30  theId = id;
31  theElements[0] = x;
32  theElements[1] = y;
33  theElements[2] = z;
34  }
unsigned int theId
Definition: FKDPoint.h:74
std::array< TYPE, numberOfDimensions > theElements
Definition: FKDPoint.h:73
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 36 of file FKDPoint.h.

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

37  {
38  static_assert(numberOfDimensions==4,"FKDPoint number of arguments does not match the number of dimensions");
39  theId = id;
40  theElements[0] = x;
41  theElements[1] = y;
42  theElements[2] = z;
43  theElements[3] = w;
44  }
const double w
Definition: UKUtility.cc:23
unsigned int theId
Definition: FKDPoint.h:74
std::array< TYPE, numberOfDimensions > theElements
Definition: FKDPoint.h:73

Member Function Documentation

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

Definition at line 67 of file FKDPoint.h.

References FKDPoint< TYPE, numberOfDimensions >::theId.

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

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

Definition at line 47 of file FKDPoint.h.

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

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

Definition at line 52 of file FKDPoint.h.

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

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

Definition at line 57 of file FKDPoint.h.

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

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

Definition at line 62 of file FKDPoint.h.

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

63  {
64  theId = id;
65  }
unsigned int theId
Definition: FKDPoint.h:74

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