13#ifndef ROOT_Math_TDataPoint
14#define ROOT_Math_TDataPoint
35template <
unsigned int K,
typename _val_type =
float>
50 for (
UInt_t k = 0; k < K; ++k)
58 template <
typename _coord_typ>
73 template <
typename _val>
Basic types used by ROOT and required by TInterpreter.
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
class representing a data point
Bool_t Less(TDataPoint &rPoint, unsigned int iAxis) const
compares two points at a given axis
static UInt_t Dimension()
value_type Distance(const TDataPoint< K, _val > &rPoint) const
euclidean distance
TDataPoint()
standard constructor sets the weight to 1 and initialises all coordinates with 0
TDataPoint(const _coord_typ *pData, _val_type fWeight=1)
constructor initialising the data point from an array
void SetCoordinate(unsigned int iAxis, _val_type fValue)
sets the coordinate along one axis
void SetWeight(float fWeight)
value_type m_vCoordinates[K]
coordinates
value_type GetCoordinate(unsigned int iAxis) const
returns the coordinate at the given axis
value_type m_fWeight
weight at this point
value_type GetWeight() const
Namespace for new Math classes and functions.
TDataPoint< 2, Float_t > TDataPoint2F
TDataPoint< 3, Double_t > TDataPoint3D
TDataPoint< 3, Float_t > TDataPoint3F
TDataPoint< 1, Double_t > TDataPoint1D
VecExpr< UnaryOp< Sqrt< T >, VecExpr< A, T, D >, T >, T, D > sqrt(const VecExpr< A, T, D > &rhs)
TDataPoint< 2, Double_t > TDataPoint2D
TDataPoint< 1, Float_t > TDataPoint1F
Namespace for new ROOT classes and functions.