HOG2
StatUtil.h
Go to the documentation of this file.
1 /*
2  * $Id: statUtil.h
3  * hog2
4  *
5  * Created by Nathan Sturtevant on 11/9/05.
6  * Modified by Nathan Sturtevant on 02/29/20.
7  *
8  * This file is part of HOG2. See https://github.com/nathansttt/hog2 for licensing information.
9  *
10  */
11 
12 #include "StatCollection.h"
13 
14 void setupAverageRatio(StatCollection *stats, char *stat1, char *stat2);
16 
17 double SumStatEntries(StatCollection *stats, const char *category, const char *owner);
18 double averageStatEntries(StatCollection *stats, const char *category, const char *owner);
19 double stdevStatEntries(StatCollection *stats, const char *category, const char *owner);
20 double maxStatEntries(StatCollection *stats, const char *category, const char *owner);
21 long unsigned countStatEntries(StatCollection *stats, const char *category, const char *owner);
maxStatEntries
double maxStatEntries(StatCollection *stats, const char *category, const char *owner)
Definition: StatUtil.cpp:161
StatCollection.h
averageStatEntries
double averageStatEntries(StatCollection *stats, const char *category, const char *owner)
Definition: StatUtil.cpp:196
countStatEntries
long unsigned countStatEntries(StatCollection *stats, const char *category, const char *owner)
Count the number of state instances in the stat collection.
Definition: StatUtil.cpp:182
StatCollection
The StatCollection class is for collecting stats across different parts of the simulation.
Definition: StatCollection.h:34
setupAverageRatio
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: StatUtil.cpp:23
SumStatEntries
double SumStatEntries(StatCollection *stats, const char *category, const char *owner)
Sum the values of all stat entries for the same (category, owner).
Definition: StatUtil.cpp:140
stdevStatEntries
double stdevStatEntries(StatCollection *stats, const char *category, const char *owner)
Definition: StatUtil.cpp:220
measureAverageRatio
void measureAverageRatio(StatCollection *stats)
Measures the ration between the two stats set-up from setupAverageRatio.
Definition: StatUtil.cpp:37