Changeset 663
- Timestamp:
- 10/19/09 11:12:36 (15 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
library/bdm/estim/particles.cpp
r661 r663 23 23 //renormalize 24 24 double sw=sum(_w); 25 if (! isfinite(sw)) {25 if (!std::isfinite(sw)) { 26 26 for (int i=0;i<n;i++){ 27 if (! isfinite(_w(i))) {_w(i)=0;}27 if (!std::isfinite(_w(i))) {_w(i)=0;} 28 28 } 29 29 sw = sum(_w); 30 if (! isfinite(sw)) {30 if (!std::isfinite(sw)) { 31 31 bdm_error("Particle filter is lost; no particle is good enough."); 32 32 }