pdf_test.hpp
Go to the documentation of this file.
00001 // Copyright (C) 2007 Klaas Gadeyne <first dot last at gmail dot com>
00002 // Copyright (C) 2007 Tinne De Laet <first dot last at mech dot kuleuven dot be>
00003 //
00004 // This program is free software; you can redistribute it and/or modify
00005 // it under the terms of the GNU General Public License as published by
00006 // the Free Software Foundation; either version 2 of the License, or
00007 // (at your option) any later version.
00008 //
00009 // This program is distributed in the hope that it will be useful,
00010 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00011 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012 // GNU General Public License for more details.
00013 //
00014 // You should have received a copy of the GNU General Public License
00015 // along with this program; if not, write to the Free Software
00016 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
00017 //
00018 
00019 #ifndef PDF_TEST_HPP
00020 #define PDF_TEST_HPP
00021 
00022 #include <cppunit/extensions/HelperMacros.h>
00023 #include <pdf/pdf.h>
00024 #include <pdf/gaussian.h>
00025 #include <pdf/uniform.h>
00026 #include <pdf/discretepdf.h>
00027 #include <pdf/linearanalyticconditionalgaussian.h>
00028 #include <pdf/discreteconditionalpdf.h>
00029 #include <pdf/mcpdf.h>
00030 #include <pdf/mixture.h>
00031 #include <wrappers/matrix/matrix_wrapper.h>
00032 
00033 #include <iostream>
00034 using namespace std;
00035 using namespace BFL;
00036 using namespace MatrixWrapper;
00037 
00038 #define DEFAULT 0 // Default sampling method, must be valid for every PDF!!
00039 #define BOXMULLER 1
00040 #define CHOLESKY 2
00041 #define RIPLEY 3 // For efficient sampling from discrete/mcpdfs
00042 
00043 class PdfTest : public CppUnit::TestFixture
00044 {
00045   CPPUNIT_TEST_SUITE( PdfTest );
00046   CPPUNIT_TEST( testMcpdfType );
00047   CPPUNIT_TEST( testUniform );
00048   CPPUNIT_TEST( testDiscretePdf );
00049   CPPUNIT_TEST( testLinearAnalyticConditionalGaussian );
00050   CPPUNIT_TEST( testDiscreteConditionalPdf );
00051   CPPUNIT_TEST( testMcpdf );
00052   CPPUNIT_TEST( testMixture );
00053   CPPUNIT_TEST( testGaussian );
00054   CPPUNIT_TEST_SUITE_END();
00055 
00056   ColumnVector _mu;
00057   SymmetricMatrix _sigma;
00058   ColumnVector _width;
00059   void testMcpdfType();
00060 
00061 public:
00062   void setUp();
00063   void tearDown();
00064 
00065   void testGaussian();
00066   void testUniform();
00067   void testDiscretePdf();
00068   void testLinearAnalyticConditionalGaussian();
00069   void testDiscreteConditionalPdf();
00070   void testMcpdf();
00071   void testMixture();
00072 
00073 private:
00074   double epsilon;
00075 
00076 };
00077 
00078 #endif  // PDF_TEST_HPP


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 Thu Feb 11 2016 22:31:57