Class MultiGrid1D
Defined in File multigrid1d.h
Inheritance Relationships
Base Type
public kami::Grid1D
(Class Grid1D)
Class Documentation
-
class MultiGrid1D : public kami::Grid1D
A one-dimensional grid where each cell may contain multiple agents.
The grid is linear and may wrap around in its only dimension.
See also
See also
Public Functions
-
MultiGrid1D(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
AgentID
of 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
-
MultiGrid1D(unsigned int maximum_x, bool wrap_x)