Changeset 404 for library/bdm/stat/exp_family.cpp
- Timestamp:
- 07/02/09 22:16:05 (15 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
library/bdm/stat/exp_family.cpp
r395 r404 24 24 if ( dimx==1 ) { //same as the following, just quicker. 25 25 double r = val ( vend ); //last entry! 26 if (r<0) return - 1e+100;26 if (r<0) return -inf; 27 27 vec Psi ( nPsi+dimx ); 28 28 Psi ( 0 ) = -1.0; … … 36 36 fsqmat R ( reshape ( val ( nPsi*dimx,vend ),dimx,dimx ) ); 37 37 double ldetR=R.logdet(); 38 if (ldetR) return - 1e+100;38 if (ldetR) return -inf; 39 39 mat Tmp=concat_vertical ( -eye ( dimx ),Th ); 40 40 fsqmat iR ( dimx ); … … 190 190 int i; 191 191 192 if (any(val<=0.)) return - 1e100;193 if (any(beta<=0.)) return - 1e100;192 if (any(val<=0.)) return -inf; 193 if (any(beta<=0.)) return -inf; 194 194 for ( i=0; i<dim; i++ ) { 195 195 res += ( alpha ( i ) - 1 ) *std::log ( val ( i ) ) - beta ( i ) *val ( i );