indii/ml/aux/DensityTreeMixturePdf.hpp

00001 #ifndef INDII_ML_AUX_DENSITYTREEMIXTUREPDF_HPP
00002 #define INDII_ML_AUX_DENSITYTREEMIXTUREPDF_HPP
00003 
00004 #include "StandardMixturePdf.hpp"
00005 #include "DensityTreePdf.hpp"
00006 
00007 namespace indii {
00008   namespace ml {
00009     namespace aux {
00010 /**
00011  * Density tree mixture probability density.
00012  *
00013  * @author Lawrence Murray <lawrence@indii.org>
00014  * @version $Rev: 404 $
00015  * @date $Date: 2008-03-05 14:52:55 +0000 (Wed, 05 Mar 2008) $
00016  *
00017  * @see MixturePdf for more information regarding the serialization
00018  * and parallelisation features of this class.
00019  */
00020 class DensityTreeMixturePdf : public StandardMixturePdf<DensityTreePdf> {
00021 public:
00022   /**
00023    * Default constructor.
00024    *
00025    * Initialises the mixture with zero dimensions. This should
00026    * generally only be used when the object is to be restored from a
00027    * serialization. Indeed, there is no other way to resize the
00028    * mixture to nonzero dimensionality except by subsequently
00029    * restoring from a serialization.
00030    */
00031   DensityTreeMixturePdf();
00032 
00033   /**
00034    * Constructor. One or more components should be added with
00035    * addComponent() after construction.
00036    *
00037    * @param N Dimensionality of the distribution.
00038    */
00039   DensityTreeMixturePdf(const unsigned int N);
00040 
00041   /**
00042    * Destructor.
00043    */
00044   virtual ~DensityTreeMixturePdf();
00045 
00046   /**
00047    * Not supported.
00048    *
00049    * @see Pdf::setDimensions()
00050    */
00051   virtual void setDimensions(const unsigned int N,
00052       const bool preserve = false);
00053 
00054 private:
00055   /**
00056    * Serialize or restore from serialization.
00057    */
00058   template<class Archive>
00059   void serialize(Archive& ar, const unsigned int version);
00060 
00061   /*
00062    * Boost.Serialization requirements.
00063    */
00064   friend class boost::serialization::access;
00065 
00066 };
00067 
00068     }
00069   }
00070 }
00071 
00072 #include "boost/serialization/base_object.hpp"
00073 
00074 template <class Archive>
00075 void indii::ml::aux::DensityTreeMixturePdf::serialize(Archive& ar,
00076     const unsigned int version) {
00077   ar & boost::serialization::base_object<
00078       indii::ml::aux::StandardMixturePdf<indii::ml::aux::DensityTreePdf> >(
00079       *this);
00080 }
00081 
00082 #endif
00083 

Generated on Wed Mar 5 16:44:42 2008 for dysii Dynamical Systems Library by  doxygen 1.5.2