ROOT logo
// @(#)root/mathcore:$Id$
// Authors: C. Gumpert    09/2011
/**********************************************************************
 *                                                                    *
 * Copyright (c) 2011 , LCG ROOT MathLib Team                         *
 *                                                                    *
 *                                                                    *
 **********************************************************************/
//
// Header file for TDataPointN class 
// 


#ifndef ROOT_Math_TDataPointN
#define ROOT_Math_TDataPointN

//STL include(s)
#include <assert.h>

//ROOT include(s)
#include "Rtypes.h"

namespace ROOT
{
namespace Math
{


template<typename _val_type = float>
class TDataPointN
{
private:
   static UInt_t kDimension;
  
public:
   typedef _val_type value_type;
  
   static UInt_t Dimension() {return kDimension;}
   static void SetDimension(UInt_t dim) {assert(dim>0);kDimension=dim;}
  
   TDataPointN();
#ifndef __MAKECINT__  
   template<typename _coord_typ>
   TDataPointN(const _coord_typ* pData,value_type fWeight = 1);
   template<typename _val>
   TDataPointN(const TDataPointN<_val>&);
#endif  
   virtual ~TDataPointN();

#ifndef __MAKECINT__
   template<typename _val>
   _val_type   Distance(const TDataPointN<_val>& rPoint) const;
#endif  
   _val_type   GetCoordinate(unsigned int iAxis) const;
   _val_type   GetWeight() const {return m_fWeight;}
   bool        Less(TDataPointN& rPoint,unsigned int iAxis) const;
   void        SetCoordinate(unsigned int iAxis,value_type fValue);
   void        SetWeight(float fWeight) {m_fWeight = fWeight;}
       
private:       
   value_type*   m_vCoordinates;
   value_type    m_fWeight;
};


}//namespace Math
}//namespace ROOT


#include "TDataPointN.icc"

#endif // ROOT_Math_TDataPointN
 TDataPointN.h:1
 TDataPointN.h:2
 TDataPointN.h:3
 TDataPointN.h:4
 TDataPointN.h:5
 TDataPointN.h:6
 TDataPointN.h:7
 TDataPointN.h:8
 TDataPointN.h:9
 TDataPointN.h:10
 TDataPointN.h:11
 TDataPointN.h:12
 TDataPointN.h:13
 TDataPointN.h:14
 TDataPointN.h:15
 TDataPointN.h:16
 TDataPointN.h:17
 TDataPointN.h:18
 TDataPointN.h:19
 TDataPointN.h:20
 TDataPointN.h:21
 TDataPointN.h:22
 TDataPointN.h:23
 TDataPointN.h:24
 TDataPointN.h:25
 TDataPointN.h:26
 TDataPointN.h:27
 TDataPointN.h:28
 TDataPointN.h:29
 TDataPointN.h:30
 TDataPointN.h:31
 TDataPointN.h:32
 TDataPointN.h:33
 TDataPointN.h:34
 TDataPointN.h:35
 TDataPointN.h:36
 TDataPointN.h:37
 TDataPointN.h:38
 TDataPointN.h:39
 TDataPointN.h:40
 TDataPointN.h:41
 TDataPointN.h:42
 TDataPointN.h:43
 TDataPointN.h:44
 TDataPointN.h:45
 TDataPointN.h:46
 TDataPointN.h:47
 TDataPointN.h:48
 TDataPointN.h:49
 TDataPointN.h:50
 TDataPointN.h:51
 TDataPointN.h:52
 TDataPointN.h:53
 TDataPointN.h:54
 TDataPointN.h:55
 TDataPointN.h:56
 TDataPointN.h:57
 TDataPointN.h:58
 TDataPointN.h:59
 TDataPointN.h:60
 TDataPointN.h:61
 TDataPointN.h:62
 TDataPointN.h:63
 TDataPointN.h:64
 TDataPointN.h:65
 TDataPointN.h:66
 TDataPointN.h:67
 TDataPointN.h:68
 TDataPointN.h:69
 TDataPointN.h:70
 TDataPointN.h:71
 TDataPointN.h:72