Class DataCollection::AgentData
ClassList > DataCollection > AgentData
Represents data collected for an agent, including their name, actions, positions, and associated IDs.
#include <AgentData.hpp>
Public Functions
Type | Name |
---|---|
AgentData (std::string name) Default constructor for AgentData class. |
|
int | GetActionSize () const |
auto & | GetActions () Retrieves the stored actions. |
auto | GetAgentIds () const Gets the agent IDs associated with the stored actions. |
std::string | GetName () const |
int | GetPositionSize () const Gets the size of the stored grid positions. |
std::vector< cse491::GridPosition > | GetPositions () const |
void | SetActions (const std::vector< std::unordered_map< std::string, size_t > > & newActions) Sets the stored actions to a new set of actions. |
void | StoreAction (std::unordered_map< std::string, size_t > action) Stores an action for the agent. |
void | StoreAgentId (int id) Stores an agent ID associated with an action. |
void | StorePositions (cse491::GridPosition pos) Stores a grid position for the agent. |
~AgentData () = default Destructor for AgentData class. |
Public Functions Documentation
function AgentData
inline DataCollection::AgentData::AgentData (
std::string name
)
function GetActionSize
inline int DataCollection::AgentData::GetActionSize () const
function GetActions
Retrieves the stored actions.
inline auto & DataCollection::AgentData::GetActions ()
Returns:
Reference to the vector of action maps.
function GetAgentIds
Gets the agent IDs associated with the stored actions.
inline auto DataCollection::AgentData::GetAgentIds () const
Returns:
The vector of agent IDs.
function GetName
inline std::string DataCollection::AgentData::GetName () const
function GetPositionSize
Gets the size of the stored grid positions.
inline int DataCollection::AgentData::GetPositionSize () const
Returns:
The number of stored grid positions.
function GetPositions
inline std::vector< cse491::GridPosition > DataCollection::AgentData::GetPositions () const
function SetActions
Sets the stored actions to a new set of actions.
inline void DataCollection::AgentData::SetActions (
const std::vector< std::unordered_map< std::string, size_t > > & newActions
)
Parameters:
newActions
The new set of actions to be stored.
function StoreAction
Stores an action for the agent.
inline void DataCollection::AgentData::StoreAction (
std::unordered_map< std::string, size_t > action
)
Parameters:
action
The action to be stored.
function StoreAgentId
Stores an agent ID associated with an action.
inline void DataCollection::AgentData::StoreAgentId (
int id
)
Parameters:
id
The agent ID to be stored.
function StorePositions
Stores a grid position for the agent.
inline void DataCollection::AgentData::StorePositions (
cse491::GridPosition pos
)
Parameters:
pos
The grid position to be stored.
function ~AgentData
DataCollection::AgentData::~AgentData () = default
The documentation for this class was generated from the following file source/DataCollection/AgentData.hpp