00001 #ifndef __BCSUMMARYPRIORMODEL__H 00002 #define __BCSUMMARYPRIORMODEL__H 00003 00004 /*! 00005 * \class BCSummaryPriorModel 00006 00007 * A helper class for the BCSummaryTool. 00008 * \brief A helper class for the BCSummaryTool. 00009 * \author Daniel Kollar 00010 * \author Kevin Kröninger 00011 * \version 1.0.0 00012 * \date 15.02.2010 00013 */ 00014 00015 /* 00016 * Copyright (C) 2008-2010, Daniel Kollar and Kevin Kroeninger. 00017 * All rights reserved. 00018 * 00019 * For the licensing terms see doc/COPYING. 00020 */ 00021 00022 // --------------------------------------------------------- 00023 00024 #include <BAT/BCModel.h> 00025 00026 // --------------------------------------------------------- 00027 00028 class BCSummaryPriorModel : public BCModel 00029 { 00030 public: 00031 00032 // Constructors and destructor 00033 00034 /** 00035 * The default constructor. */ 00036 BCSummaryPriorModel(); 00037 00038 /** 00039 * A constructor. 00040 * @param name The name of the model. */ 00041 BCSummaryPriorModel(const char * name); 00042 00043 /** 00044 * The default destructor. */ 00045 ~BCSummaryPriorModel(); 00046 00047 /** 00048 * Set a pointer to the model under study. 00049 * @param model The model under study. */ 00050 void SetTestModel(BCModel* model) 00051 { fTestModel = model; }; 00052 00053 /** 00054 * Run the MCMC and find the global mode for this model, i.e., only 00055 * the prior knowledge of the test model is considered. */ 00056 int PerformAnalysis(); 00057 00058 /** 00059 * Calculates and returns the log of the prior probability at a 00060 * given point in parameter space. 00061 * @param parameters A vector of coordinates in the parameter space. 00062 * @return The prior probability. */ 00063 double LogAPrioriProbability(std::vector <double> parameters); 00064 00065 /** 00066 * Calculates and returns the log of the Likelihood at a given point 00067 * in parameter space. 00068 * @param parameters A vector of coordinates in the parameter space. 00069 * @return The log likelihood. */ 00070 double LogLikelihood(std::vector <double> parameters); 00071 00072 private: 00073 00074 /** 00075 * A pointer to the model under study. */ 00076 BCModel * fTestModel; 00077 00078 }; 00079 // --------------------------------------------------------- 00080 00081 #endif 00082