BCDataSet.h

Go to the documentation of this file.
00001 #ifndef __BCDATASET__H
00002 #define __BCDATASET__H
00003 
00016 /*
00017  * Copyright (C) 2008, Daniel Kollar and Kevin Kroeninger.
00018  * All rights reserved.
00019  *
00020  * For the licensing terms see doc/COPYING.
00021  */
00022 
00023 // ---------------------------------------------------------
00024 
00025 #include <vector>
00026 
00027 // BAT classes
00028 class BCDataPoint;
00029 
00030 // ---------------------------------------------------------
00031 
00032 typedef std::vector<BCDataPoint*> BCDataVector;
00033 
00034 // ---------------------------------------------------------
00035 
00036 class BCDataSet
00037 {
00038    public:
00039 
00041       /* @{ */
00042 
00043       /*
00044        * Default constructor */
00045       BCDataSet();
00046 
00047       /*
00048        * Default destructor */
00049       virtual ~BCDataSet();
00050 
00051       /* @} */
00052 
00054       /* @{ */
00055 
00056       /*
00057        * @param The vector of data points. */
00058 //    BCDataVector * GetDataVector();
00059 
00060       /*
00061        * @return The number of data points. */
00062       unsigned int GetNDataPoints();
00063 
00064       /*
00065        * @return number of values per data point (dimension of data). */
00066       unsigned int GetNValuesPerPoint();
00067 
00068       /*
00069        * @param index The index of the data point to be returned.
00070        * @return The data point at the index. */
00071       BCDataPoint * GetDataPoint(unsigned int index);
00072 
00073 
00074       /* @} */
00075 
00077       /* @{ */
00078 
00082       int ReadDataFromFile(const char * filename, const char * treename, const char * branchnames)
00083          { return this ->  ReadDataFromFileTree(filename, treename, branchnames); };
00084 
00085       int ReadDataFromFile(const char * filename, int nvariables)
00086          { return this -> ReadDataFromFileTxt(filename, nvariables); };
00087 
00100       int ReadDataFromFileTree(const char * filename, const char * treename, const char * branchnames);
00101 
00110       int ReadDataFromFileTxt(const char * filename, int nvariables);
00111 
00115       void AddDataPoint(BCDataPoint * datapoint);
00116 
00119       void Reset();
00120 
00123       void Dump();
00124 
00125       /* @} */
00126 
00127    private:
00128 
00129       /*
00130        * A vector containing the data points */
00131       BCDataVector * fBCDataVector;
00132 
00133 };
00134 
00135 // ---------------------------------------------------------
00136 
00137 #endif
00138 

Generated on Thu Feb 11 11:29:30 2010 for BayesianAnalysisToolkit by  doxygen 1.5.1