Skip to content

Class DataCollection::AgentInteractionCollector

ClassList > DataCollection > AgentInteractionCollector

A data collector class to quantify agent interactions. More...

  • #include <AgentInteractionCollector.hpp>

Public Functions

Type Name
AgentInteractionCollector () = default
Data storage map of agent name to interactions.
const std::unordered_map< std::string, int > & GetInteractionData ()
size_t GetUniqueInteractions ()
void RecordInteraction (const std::string & agentName)
void WriteToInteractionFile (const std::string filename)

Detailed Description

Useful for setting up graphs for common interactions.

Public Functions Documentation

function AgentInteractionCollector

Data storage map of agent name to interactions.

DataCollection::AgentInteractionCollector::AgentInteractionCollector () = default

Default constructor for AgentInteractionCollector

function GetInteractionData

inline const std::unordered_map< std::string, int > & DataCollection::AgentInteractionCollector::GetInteractionData () 

Getter for interaction data

Returns:

Const reference to the interaction data storage.

function GetUniqueInteractions

inline size_t DataCollection::AgentInteractionCollector::GetUniqueInteractions () 

Get the amount of unique agents that occured

Returns:

int amount of agent occurances

function RecordInteraction

inline void DataCollection::AgentInteractionCollector::RecordInteraction (
    const std::string & agentName
) 

Increment occurance amount for a certain agent.

Parameters:

  • agentName Agent name to record new interaction with

function WriteToInteractionFile

inline void DataCollection::AgentInteractionCollector::WriteToInteractionFile (
    const std::string filename
) 

The documentation for this class was generated from the following file source/DataCollection/AgentInteractionCollector.hpp