HOG2
|
Go to the source code of this file.
Functions | |
double | max (double a, double b) |
void | setupAverageRatio (StatCollection *stats, char *stat1, char *stat2) |
Setup the stats so a ratio between two stats for each unit can be properly measured. More... | |
void | measureAverageRatio (StatCollection *stats) |
Measures the ration between the two stats set-up from setupAverageRatio. More... | |
double | SumStatEntries (StatCollection *stats, const char *category, const char *owner) |
Sum the values of all stat entries for the same (category, owner). More... | |
double | maxStatEntries (StatCollection *stats, const char *category, const char *owner) |
long unsigned | countStatEntries (StatCollection *stats, const char *category, const char *owner) |
Count the number of state instances in the stat collection. More... | |
double | averageStatEntries (StatCollection *stats, const char *category, const char *owner) |
double | stdevStatEntries (StatCollection *stats, const char *category, const char *owner) |
double averageStatEntries | ( | StatCollection * | stats, |
const char * | category, | ||
const char * | owner | ||
) |
Definition at line 196 of file StatUtil.cpp.
References statistics::category, floatStored, statValue::fval, StatCollection::GetNumStats(), StatCollection::GetStatNum(), StatCollection::LookupCategory(), StatCollection::LookupOwner(), statValue::lval, statistics::owner, statistics::sType, and statistics::value.
Referenced by stdevStatEntries().
long unsigned countStatEntries | ( | StatCollection * | stats, |
const char * | category, | ||
const char * | owner | ||
) |
Count the number of state instances in the stat collection.
Definition at line 182 of file StatUtil.cpp.
References statistics::category, StatCollection::GetNumStats(), StatCollection::GetStatNum(), StatCollection::LookupCategory(), StatCollection::LookupOwner(), and statistics::owner.
|
inline |
Definition at line 16 of file StatUtil.cpp.
Referenced by maxStatEntries().
double maxStatEntries | ( | StatCollection * | stats, |
const char * | category, | ||
const char * | owner | ||
) |
Definition at line 161 of file StatUtil.cpp.
References statistics::category, floatStored, statValue::fval, StatCollection::GetNumStats(), StatCollection::GetStatNum(), StatCollection::LookupCategory(), StatCollection::LookupOwner(), statValue::lval, max(), statistics::owner, statistics::sType, and statistics::value.
void measureAverageRatio | ( | StatCollection * | stats | ) |
Measures the ration between the two stats set-up from setupAverageRatio.
Definition at line 37 of file StatUtil.cpp.
References statistics::category, StatCollection::GetNumStats(), StatCollection::GetStatNum(), if(), longStored, StatCollection::lookupCategoryID(), StatCollection::LookupOwner(), StatCollection::LookupOwnerID(), and statistics::owner.
void setupAverageRatio | ( | StatCollection * | stats, |
char * | stat1, | ||
char * | stat2 | ||
) |
Setup the stats so a ratio between two stats for each unit can be properly measured.
Definition at line 23 of file StatUtil.cpp.
References StatCollection::AddIncludeFilter(), StatCollection::ClearAllStats(), and StatCollection::ClearFilters().
double stdevStatEntries | ( | StatCollection * | stats, |
const char * | category, | ||
const char * | owner | ||
) |
Definition at line 220 of file StatUtil.cpp.
References averageStatEntries(), statistics::category, floatStored, statValue::fval, StatCollection::GetNumStats(), StatCollection::GetStatNum(), StatCollection::LookupCategory(), StatCollection::LookupOwner(), statValue::lval, statistics::owner, statistics::sType, and statistics::value.
double SumStatEntries | ( | StatCollection * | stats, |
const char * | category, | ||
const char * | owner | ||
) |
Sum the values of all stat entries for the same (category, owner).
Type is automatically known from the entry.
Definition at line 140 of file StatUtil.cpp.
References statistics::category, floatStored, statValue::fval, StatCollection::GetNumStats(), StatCollection::GetStatNum(), StatCollection::LookupCategory(), StatCollection::LookupOwner(), statValue::lval, statistics::owner, statistics::sType, and statistics::value.