KrisLibrary  1.0.0
DataSet.h
1 #ifndef STAT_DATA_SET_H
2 #define STAT_DATA_SET_H
3 
4 #include "statistics.h"
5 #include <string>
6 
7 namespace Statistics {
8 
14 class DataSet
15 {
16  public:
17  inline Real& operator()(int i,int j) { return data(i,j); }
18  inline const Real& operator()(int i,int j) const { return data(i,j); }
19 
22  void GetObservations(std::vector<Vector>& output);
23  void SetObservations(const std::vector<Vector>& input);
24 
26  void SetObservation(int i,std::vector<Real>& in);
27  void SetObservation(int i,Vector& in);
28 
30  void GetObservation(int i,std::vector<Real>& out);
31  void GetObservation(int i,Vector& out);
32 
34  void SetElement(int j,std::vector<Real>& in);
35  void SetElement(int j,Vector& in);
36 
38  void GetElement(int j,std::vector<Real>& out);
39  void GetElement(int j,Vector& out);
40 
41  std::vector<std::string> labels;
42  Matrix data;
43 };
44 
45 }
46 
47 #endif
48 
49 
50 
51 
52 
void SetElement(int j, std::vector< Real > &in)
sets the jth element of data to the input vector
void SetObservation(int i, std::vector< Real > &in)
sets the ith observation to the input vector
void GetElement(int j, std::vector< Real > &out)
outputs the jth element of data into the output vector
Definition: DataSet.cpp:36
Contains all definitions in the statistics directory.
Definition: BernoulliDistribution.h:6
void GetObservation(int i, std::vector< Real > &out)
outputs the ith observation into the output vector
Basic statistical utilities.
void GetObservations(std::vector< Vector > &output)
Definition: DataSet.cpp:4
Definition: DataSet.h:14