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

◆ FKDPoint() [1/4]

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

◆ FKDPoint() [2/4]

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 triggerObjects_cff::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  }
unsigned int theId
Definition: FKDPoint.h:51
std::array< TYPE, numberOfDimensions > theElements
Definition: FKDPoint.h:50

◆ FKDPoint() [3/4]

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 triggerObjects_cff::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  }
unsigned int theId
Definition: FKDPoint.h:51
std::array< TYPE, numberOfDimensions > theElements
Definition: FKDPoint.h:50

◆ FKDPoint() [4/4]

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 triggerObjects_cff::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  }
T w() const
unsigned int theId
Definition: FKDPoint.h:51
std::array< TYPE, numberOfDimensions > theElements
Definition: FKDPoint.h:50

Member Function Documentation

◆ getId()

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.

47 { return theId; }
unsigned int theId
Definition: FKDPoint.h:51

◆ operator[]() [1/2]

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

◆ operator[]() [2/2]

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

◆ setDimension()

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

◆ setId()

template<class TYPE, int numberOfDimensions>
void FKDPoint< TYPE, numberOfDimensions >::setId ( const unsigned int  id)
inline

Definition at line 45 of file FKDPoint.h.

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

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

Member Data Documentation

◆ theElements

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

◆ theId

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