Changeset 711

Show
Ignore:
Timestamp:
11/08/09 22:07:31 (14 years ago)
Author:
mido
Message:

definitivne odstraneno epdf2mpdf a mepdf, rozpravano zacleneni testu mmixu pod pdf_harness

Location:
library
Files:
1 added
4 modified

Legend:

Unmodified
Added
Removed
  • library/bdm/stat/emix.h

    r693 r711  
    496496        vec samplecond (const vec &cond); 
    497497 
     498        //! Load from structure with elements: 
     499        //!  \code 
     500        //! { class='mmix'; 
     501        //!   pdfs = (..., ...);     // list of pdfs in the mixture 
     502        //!   weights = ( 0.5, 0.5 ); // weights of pdfs in the mixture 
     503        //! } 
     504        //! \endcode 
     505        //!@} 
     506        void from_setting ( const Setting &set ) { 
     507                UI::get ( Coms, set, "pdfs", UI::compulsory ); 
     508 
     509                if( !UI::get( w, set, "weights", UI::optional ) ) 
     510                { 
     511                        int len = Coms.length(); 
     512                        w.set_length( len ); 
     513                        double default_weight = 1.0 / len; 
     514                        for( int i=0; i < len; i++) 
     515                                w(i) = default_weight; 
     516                } 
     517        } 
    498518}; 
     519UIREGISTER ( mmix ); 
    499520 
    500521} 
  • library/doc/tutorial/00install.dox

    r643 r711  
    4747\section win Windows 
    4848 
    49 The following approach was tested on Visual Studio 9, so we recommend to download and install it.  
    50 http://www.microsoft.com/express/vc/ 
     49The following approach was tested on the Microsoft Visual Studio 9.  
    5150 
    5251Make sure you have cmake installed. 
     
    7776  directory 
    7877 
     78For more comfortable work with Subversion, we recommend to install also the Visual SVN -  
     79a Visual Studio plug-in that integrates Subversion and TortoiseSVN, see http://www.visualsvn.com/ 
     80 
     81 
    7982\section mac Mac OS X 
    8083 
  • library/doc/tutorial/01userguide.dox

    r693 r711  
    245245DS.class = 'pdfDS'; 
    246246DS.pdf.class  = 'mprod'; 
    247 DS.pdf.pdfs  = {fy, epdf2mpdf(fu)}; 
     247DS.pdf.pdfs  = {fy, fu}; 
    248248\endcode 
    249249 
     
    253253 - the same concept is used for enorm, where enorm<chmat> and enorm<fsqmat> are also possible. In this particular use, these objects are equivalent. In specific situation, e.g. Kalman filter implemented on Choleski decomposition (bdm::KalmanCh), only enorm<chmat> is approprate. 
    254254 - class 'mprod' represents the chain rule of probability. Attribute \c pdfs of its configuration structure is a list of conditional densities. Conditional density \f$ f(a|b)\f$ is represented by class \c pdf and its offsprings. Class \c RV is used to describe both variables before conditioning (field \c rv ) and after conditioning sign (field \c rvc). 
    255  - due to simplicity of implementation, mprod accept only conditional densities in the field \c pdfs. Hence, the pdf \f$ f(u_t)\f$ must be converted to conditional density with empty conditioning, \f$ f(u_t| \{\})\f$. This is achieved by calling function epdf2mpdf which is only a trivial wrapper creating class bdm::mepdf. 
    256255  
    257256  
  • library/doc/tutorial/memory_management.dox

    r613 r711  
    107107 
    108108\code 
    109 class mepdf : public mpdf 
    110 { 
    111         shared_ptr<epdf> iepdf; 
     109class mratio: public pdf { 
     110protected: 
     111        shared_ptr<epdf> den; 
    112112public: 
    113         mepdf (shared_ptr<epdf> em) { 
    114                 iepdf = em; 
     113        mratio ( const epdf* nom0, const RV &rv, bool copy = false ) { 
     114                // build denominator 
     115                den = nom0->marginal ( rvc ); 
    115116\endcode 
    116117