PDF.h
Go to the documentation of this file.
1 /************************************************************************
2  * Copyright (C) 2012 Eindhoven University of Technology (TU/e). *
3  * All rights reserved. *
4  ************************************************************************
5  * Redistribution and use in source and binary forms, with or without *
6  * modification, are permitted provided that the following conditions *
7  * are met: *
8  * *
9  * 1. Redistributions of source code must retain the above *
10  * copyright notice, this list of conditions and the following *
11  * disclaimer. *
12  * *
13  * 2. Redistributions in binary form must reproduce the above *
14  * copyright notice, this list of conditions and the following *
15  * disclaimer in the documentation and/or other materials *
16  * provided with the distribution. *
17  * *
18  * THIS SOFTWARE IS PROVIDED BY TU/e "AS IS" AND ANY EXPRESS OR *
19  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED *
20  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE *
21  * ARE DISCLAIMED. IN NO EVENT SHALL TU/e OR CONTRIBUTORS BE LIABLE *
22  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR *
23  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT *
24  * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; *
25  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF *
26  * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT *
27  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE *
28  * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH *
29  * DAMAGE. *
30  * *
31  * The views and conclusions contained in the software and *
32  * documentation are those of the authors and should not be *
33  * interpreted as representing official policies, either expressed or *
34  * implied, of TU/e. *
35  ************************************************************************/
36 
37 #ifndef PROBLIB_PDF_H_
38 #define PROBLIB_PDF_H_
39 
40 #include "problib/globals.h"
41 
42 namespace pbl {
43 
44 class Gaussian;
45 class Mixture;
46 
47 class PDF {
48 
49 public:
50 
51  enum PDFType {
59  };
60 
61  PDF(int dimensions, PDFType type);
62 
63  PDF(const PDF& orig);
64 
65  virtual ~PDF();
66 
67  virtual PDF* clone() const = 0;
68 
69  //virtual double getDensity(const arma::vec& v) const = 0;
70 
71  virtual double getMaxDensity() const = 0;
72 
73  virtual bool getExpectedValue(std::string& v) const;
74 
75  virtual bool getExpectedValue(arma::vec& v) const;
76 
77  virtual double getLikelihood(const PDF& pdf) const = 0;
78 
79  int dimensions() const;
80 
81  PDFType type() const;
82 
83  virtual std::string toString(const std::string& indent = "") const = 0;
84 
85 protected:
86 
88 
90 
91 };
92 
93 }
94 
95 #endif /* PDF_H_ */
int dimensions() const
Definition: PDF.cpp:52
PDFType type() const
Definition: PDF.cpp:56
int dimensions_
Definition: PDF.h:87
virtual bool getExpectedValue(std::string &v) const
Definition: PDF.cpp:60
PDF(int dimensions, PDFType type)
Definition: PDF.cpp:41
virtual PDF * clone() const =0
virtual double getMaxDensity() const =0
Definition: PDF.h:47
Col< double > vec
virtual std::string toString(const std::string &indent="") const =0
virtual ~PDF()
Definition: PDF.cpp:49
PDFType type_
Definition: PDF.h:89
PDFType
Definition: PDF.h:51
virtual double getLikelihood(const PDF &pdf) const =0


problib
Author(s): Sjoerd van den Dries, Jos Elfring
autogenerated on Fri Apr 16 2021 02:32:19