3DCoat
3D-COAT 4.9.xx
3DCoat is the one application that has all the tools you need to take your 3D idea from a block of digital clay all the way to a production ready, fully textured organic or hard surface model.
|
This class is intended to calculate capped average values. Let you have positive values a[i]. Most of them are valid and regular, bot some (small amount) of them are erratic and getting big random value. You need to calculate average value without taking into account too big and too small values. Use this class for this purpose. Multithreaded addition supported. More...
#include <CappedAverage.h>
Public Member Functions | |
void | operator+= (float value) |
add the value to summ More... | |
void | finish (float top_cap_coef=8.0f, float bottom_cap_coef=0.01f) |
Call it once after finishing the summ. The top_cap_coef and bottom_cap_coef used to drop off values that are above average_value*top_cap_coef or below the average_value * bottom_cap_coef. More... | |
float | average () |
Get capped average value. More... | |
This class is intended to calculate capped average values. Let you have positive values a[i]. Most of them are valid and regular, bot some (small amount) of them are erratic and getting big random value. You need to calculate average value without taking into account too big and too small values. Use this class for this purpose. Multithreaded addition supported.
float CappedAverage< num >::average | ( | ) |
Get capped average value.
void CappedAverage< num >::finish | ( | float | top_cap_coef = 8.0f , |
float | bottom_cap_coef = 0.01f |
||
) |
Call it once after finishing the summ. The top_cap_coef and bottom_cap_coef used to drop off values that are above average_value*top_cap_coef or below the average_value * bottom_cap_coef.
gradual average finding
void CappedAverage< num >::operator+= | ( | float | value | ) |
add the value to summ