emergent 8.5.1 | Home · Wiki Docs For: Average · Emergent Help Browser |

encapsulates the sum and count values for computing an average value in an incremental fashion over time

See for more info: Wiki Docs For: Average

#include <Average>

defined at: /mnt/ssd/grey/local/include/Emergent/Average.h :28-71

Inherits From: taOBase, taBase

Inherited By: Average*, Average&, const Average

Index: SubTypes, Members, Methods, Static Members, Static Methods, Expert Members, Expert Methods

- float
**Average::GetAvg**( ) - float
**Average::GetAvg_Reset**( ) - void
**Average::Increment**( float*val*) - float
**Average::IncrementAvg**( float*val*) - void
**Average::IncrementN**( float*val*, int*n_new*) - float
**Average::IncrementNAvg**( float*val*, int*n_new*) - void
**Average::ResetAvg**( ) - void
**Average::ResetSum**( )

- void
**taOBase::RemoveAllUserData**( )

- taBase*
**taOBase::GetOwner**( ) - TypeDef*
**Average::GetTypeDef**( ) - taSigLink**
**taOBase::addr_sig_link**( )

the computed average value that was last computed, as sum / n -- this may not reflect current sum, n values -- just depends on when GetAvg was computed -- see UpdtAvg versions of increment methods

the number of values accumulated since last reset

overall sum of values accumulated since last reset

compute the average as sum / n, update the avg member to store this value, and return it

Show Source Codecompute the average as sum / n, update the avg member to store this value, and return it -- also reset sum, n counters for next time

Show Source Codeincrement the sum by given value, and n by one count

Show Source Codeincrement the sum by given value, and n by one count, and return new average value (updates avg field)

Show Source Codeincrement the sum by given value, and n by given count -- for a batch update of multiple items

Show Source Codeincrement the sum by given value, and n by given count, and return new average value (updates avg field)

Show Source Codereset the sum and n accumulation variables, and the computed average value

Show Source Codereset the sum and n accumulation variables

Show Source Codeget rid of our user data list entirely -- this is done automatically when saving something that has no user data items, but you can also force it with this method -- deletes the whole list

Show Source Code**owner**: taBase***user_data_**: UserDataItem_List*

- UserDataItem_List*
**taOBase::GetUserDataList**( bool*force*= false )

pointer to owner

storage for user data (created if needed) DO NOT ACCESS this list directly -- use the GetUserData / SetUserData etc interface!

gets the userdatalist for this class

Show Source CodeCopyright © 2018Regents of the University of Colorado, Carnegie Mellon University, Princeton University. | emergent 8.5.1 |