pdf_test.hpp
Go to the documentation of this file.
1 // Copyright (C) 2007 Klaas Gadeyne <first dot last at gmail dot com>
2 // Copyright (C) 2007 Tinne De Laet <first dot last at mech dot kuleuven dot be>
3 //
4 // This program is free software; you can redistribute it and/or modify
5 // it under the terms of the GNU General Public License as published by
6 // the Free Software Foundation; either version 2 of the License, or
7 // (at your option) any later version.
8 //
9 // This program is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU General Public License for more details.
13 //
14 // You should have received a copy of the GNU General Public License
15 // along with this program; if not, write to the Free Software
16 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17 //
18 
19 #ifndef PDF_TEST_HPP
20 #define PDF_TEST_HPP
21 
22 #include <cppunit/extensions/HelperMacros.h>
23 #include <pdf/pdf.h>
24 #include <pdf/gaussian.h>
25 #include <pdf/uniform.h>
26 #include <pdf/discretepdf.h>
29 #include <pdf/mcpdf.h>
30 #include <pdf/mixture.h>
32 
33 #include <iostream>
34 using namespace std;
35 using namespace BFL;
36 using namespace MatrixWrapper;
37 
38 #define DEFAULT 0 // Default sampling method, must be valid for every PDF!!
39 #define BOXMULLER 1
40 #define CHOLESKY 2
41 #define RIPLEY 3 // For efficient sampling from discrete/mcpdfs
42 
43 class PdfTest : public CppUnit::TestFixture
44 {
45  CPPUNIT_TEST_SUITE( PdfTest );
46  CPPUNIT_TEST( testMcpdfType );
47  CPPUNIT_TEST( testUniform );
48  CPPUNIT_TEST( testDiscretePdf );
49  CPPUNIT_TEST( testLinearAnalyticConditionalGaussian );
50  CPPUNIT_TEST( testDiscreteConditionalPdf );
51  CPPUNIT_TEST( testMcpdf );
52  CPPUNIT_TEST( testMixture );
53  CPPUNIT_TEST( testGaussian );
54  CPPUNIT_TEST_SUITE_END();
55 
56  ColumnVector _mu;
57  SymmetricMatrix _sigma;
58  ColumnVector _width;
59  void testMcpdfType();
60 
61 public:
62  void setUp();
63  void tearDown();
64 
65  void testGaussian();
66  void testUniform();
67  void testDiscretePdf();
68  void testLinearAnalyticConditionalGaussian();
69  void testDiscreteConditionalPdf();
70  void testMcpdf();
71  void testMixture();
72 
73 private:
74  double epsilon;
75 
76 };
77 
78 #endif // PDF_TEST_HPP
ColumnVector _width
Definition: pdf_test.hpp:58
SymmetricMatrix _sigma
Definition: pdf_test.hpp:57
double epsilon
Definition: pdf_test.hpp:74
ColumnVector _mu
Definition: pdf_test.hpp:56


bfl
Author(s): Klaas Gadeyne, Wim Meeussen, Tinne Delaet and many others. See web page for a full contributor list. ROS package maintained by Wim Meeussen.
autogenerated on Mon Jun 10 2019 12:47:59