BayesianAnalysisToolkit  0.9.3
BCDataSet.h
Go to the documentation of this file.
1 #ifndef __BCDATASET__H
2 #define __BCDATASET__H
3 
16 /*
17  * Copyright (C) 2007-2013, the BAT core developer team
18  * All rights reserved.
19  *
20  * For the licensing terms see doc/COPYING.
21  * For documentation see http://mpp.mpg.de/bat
22  */
23 
24 // ---------------------------------------------------------
25 
26 #include <vector>
27 
28 // BAT classes
30 
31 // ---------------------------------------------------------
32 
33 typedef std::vector<BCDataPoint*> BCDataVector;
34 
35 // ---------------------------------------------------------
36 
37 class BCDataSet
38 {
39  public:
40 
46  BCDataSet();
47 
50  BCDataSet(const BCDataSet & bcdataset);
51 
54  virtual ~BCDataSet();
55 
62  BCDataSet & operator = (const BCDataSet & bcdataset);
63 
70  unsigned int GetNDataPoints();
71 
74  unsigned int GetNValuesPerPoint();
75 
79  BCDataPoint * GetDataPoint(unsigned int index);
80 
86  std::vector<double> GetDataComponents(int index);
87 
96  int ReadDataFromFile(const char * filename, const char * treename, const char * branchnames)
97  { return this -> ReadDataFromFileTree(filename, treename, branchnames); };
98 
99  int ReadDataFromFile(const char * filename, int nvariables)
100  { return this -> ReadDataFromFileTxt(filename, nvariables); };
101 
114  int ReadDataFromFileTree(const char * filename, const char * treename, const char * branchnames);
115 
124  int ReadDataFromFileTxt(const char * filename, int nvariables);
125 
129  void AddDataPoint(BCDataPoint * datapoint);
130 
133  void Reset();
134 
137  void Dump();
138 
141  private:
142  // todo why a pointer? creates a huge amount of unnecessary checks
146 
147 };
148 
149 // ---------------------------------------------------------
150 
151 #endif
152