Changeset 900 for library/bdm/stat

Show
Ignore:
Timestamp:
04/11/10 22:05:11 (14 years ago)
Author:
smidl
Message:

particle bug fixing

Location:
library/bdm/stat
Files:
2 modified

Legend:

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

    r886 r900  
    244244        vec tmp ( dim ); //second moment 
    245245        for ( int i = 0; i < no_factors(); i++ ) { 
    246                 vec pom = factor ( i )->mean(); 
     246                vec pom = factor ( i )->variance(); 
    247247                dls ( i )->pushup ( tmp, pow ( pom, 2 ) ); 
    248248        } 
    249         return tmp - pow ( mean(), 2 ); 
     249        return tmp; 
    250250} 
    251251vec eprod_base::sample() const { 
  • library/bdm/stat/exp_family.h

    r896 r900  
    18791879                double evallog (const vec &dt) const {return -inf;} 
    18801880                vec mean () const {return point;} 
    1881                 vec variance () const {return pow(point,2);} 
     1881                vec variance () const {return zeros(point.length());} 
    18821882                void qbounds ( vec &lb, vec &ub, double percentage = 0.95 ) const { lb = point; ub = point;} 
    18831883                //! access