Boost logo

Boost Users :

Subject: Re: [Boost-users] [accumulators] "count" NaN but otherwise ignore it?
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2014-01-29 15:08:11


AMDG

On 01/29/2014 11:02 AM, Rhys Ulerich wrote:
> Is there a feature within accumulators to count NaNs on extraction but
> to otherwise ignore them? Maybe some sort of pass filter on incoming
> data? I've got a situation where I'd like to avoid NaNs clobbering
> otherwise useful information, but I still want to total count of data
> seen to include them.
>
> The context is a time integrator for a physics simulation. The
> integrator tracks the number of timesteps. When the physics kicks
> back a NaN (because something's amiss), I'd like to count the failed
> timestep but not have the NaN destroy the useful mean of timesteps
> taken thus far.
>

This behavior of count would break
any accumulator that depends on count
(e.g. mean).

In Christ,
Steven Watanabe


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net