13 #ifndef ROOT_Math_TDataPoint
14 #define ROOT_Math_TDataPoint
26 template<
unsigned int K,
typename _val_type =
float>
30 typedef _val_type value_type;
34 static UInt_t Dimension() {
return kDimension;}
37 template<
typename _coord_typ>
38 TDataPoint(
const _coord_typ* pData,_val_type fWeight = 1);
42 template<
typename _val>
43 value_type Distance(
const TDataPoint<K,_val>& rPoint)
const;
45 value_type GetCoordinate(
unsigned int iAxis)
const;
46 value_type GetWeight()
const {
return m_fWeight;}
47 Bool_t Less(TDataPoint& rPoint,
unsigned int iAxis)
const;
48 void SetCoordinate(
unsigned int iAxis,_val_type fValue);
49 void SetWeight(
float fWeight) {m_fWeight = fWeight;}
52 value_type m_vCoordinates[K];
57 typedef TDataPoint<1,Float_t> TDataPoint1F;
58 typedef TDataPoint<2,Float_t> TDataPoint2F;
59 typedef TDataPoint<3,Float_t> TDataPoint3F;
60 typedef TDataPoint<1,Double_t> TDataPoint1D;
61 typedef TDataPoint<2,Double_t> TDataPoint2D;
62 typedef TDataPoint<3,Double_t> TDataPoint3D;
70 #endif // ROOT_Math_TDataPoint