Class SoloGrid1D
Defined in File sologrid1d.h
Inheritance Relationships
Base Type
public kami::Grid1D(Class Grid1D)
Class Documentation
-
class SoloGrid1D : public kami::Grid1D
A one-dimensional grid where each cell may contain one agents.
The grid is linear and may wrap around in its only dimension.
See also
See also
Public Functions
-
SoloGrid1D(unsigned int maximum_x, bool wrap_x)
Constructor.
- Parameters
maximum_x – [in] the length of the grid.
wrap_x – [in] should the grid wrap around on itself.
-
virtual AgentID add_agent(AgentID agent_id, const GridCoord1D &coord) override
Place agent on the grid at the specified location.
- Parameters
agent_id – [in] the
AgentIDof the agent to add.coord – [in] the coordinates of the agent.
- Returns
false if the agent is not placed at the specified location, otherwise, true
-
SoloGrid1D(unsigned int maximum_x, bool wrap_x)