root/libBM.h @ 3

Revision 2, 1.3 kB (checked in by smidl, 17 years ago)

first shot

  • Property svn:eol-style set to native
Line 
1/*!
2 * \file
3 * \brief Bayesian Models (bm) that use Bayes rule to learn from observations
4 * \author Vaclav Smidl.
5 *
6 * -----------------------------------
7 * BDM++ - C++ library for Bayesian Decision Making under Uncertainty
8 *
9 * Using IT++ for numerical operations
10 * -----------------------------------
11 */
12
13#ifndef BM_H
14#define BM_H
15
16#include <itpp/itbase.h>
17//#include <std>
18
19using namespace itpp;
20
21class RV {
22int len;
23ivec ids;
24ivec sizes;
25ivec times;
26ivec obs;
27Array<std::string> names;
28
29public:
30 //! Full constructor which is called by the others
31 RV(ivec in_ids, Array<std::string> in_names, ivec in_sizes, ivec in_times, ivec in_obs);
32 //! default constructor
33 RV(ivec ids);
34 friend std::ostream &operator<<(std::ostream &os, const RV &rv);
35};
36
37
38
39
40//! Class representing function of variables
41class fnc {
42RV rv;
43};
44
45
46class BM {
47public:
48//! Incremental Bayes rule
49void bayes(vec dt);
50//! Batch Bayes rule (columns of Dt are observations)
51virtual void bayes(mat Dt);
52};
53
54class epdf {
55RV rv;
56public:
57//! Returns the required moment of the epdf
58virtual vec moment(const int order = 1);
59};
60
61class mpdf {
62//! modeled random variable
63RV rv;
64//! random variable in condition
65RV rvc;
66public:
67
68//! Returns the required moment of the epdf
69virtual fnc moment(const int order = 1);
70};
71
72#endif // BM_H
Note: See TracBrowser for help on using the browser.