How to check an empty boost::accumulators acc or not?
For example:
if (acc.isEmpty())//I don't know what function here
return 0;
else
return boost::accumulators::mean(acc).
Because if it's empty, i get NaN for boost::accumulators::mean(acc).
How to check an empty boost::accumulators acc or not?
For example:
if (acc.isEmpty())//I don't know what function here
return 0;
else
return boost::accumulators::mean(acc).
Because if it's empty, i get NaN for boost::accumulators::mean(acc).
Copyright © 2021 Jogjafile Inc.
You could use the accumulator
count:Alternatively, you could simply check if it is
nanby callingstd::isnan: