File failed to load: https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/extensions/ams.js
ALMaSS  1.2 (after EcoStack, March 2024)
The Animal, Landscape and Man Simulation System
All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
IDMap< a_type > Class Template Reference

Used to map locations of animals in space. More...

#include <MovementMap.h>

Public Member Functions

a_type GetMapValue (unsigned x, unsigned y)
 
void SetMapValue (unsigned x, unsigned y, a_type p)
 
void ClearMapValue (unsigned x, unsigned y)
 
 IDMap (Landscape *L)
 
 ~IDMap ()
 

Public Attributes

vector< a_type > m_TheMap
 
int maxx
 
int maxy
 

Detailed Description

template<class a_type>
class IDMap< a_type >

Used to map locations of animals in space.

Constructor & Destructor Documentation

◆ IDMap()

template<class a_type>
IDMap< a_type >::IDMap ( Landscape L)
inline
149  {
150  maxx = L->SupplySimAreaWidth();
151  maxy = L->SupplySimAreaHeight();
152  m_TheMap.resize(maxx*maxy);
153  for (int y = 0; y<maxy; y++) {
154  for (int x = 0; x<maxx; x++) {
155  SetMapValue(x, y, NULL);
156  }
157  }
158  }

◆ ~IDMap()

template<class a_type>
IDMap< a_type >::~IDMap ( )
inline
159  {
160  ;
161  }

Member Function Documentation

◆ ClearMapValue()

template<class a_type>
void IDMap< a_type >::ClearMapValue ( unsigned  x,
unsigned  y 
)
inline

◆ GetMapValue()

◆ SetMapValue()

Member Data Documentation

◆ m_TheMap

◆ maxx

◆ maxy

template<class a_type>
int IDMap< a_type >::maxy

The documentation for this class was generated from the following file:
IDMap::m_TheMap
vector< a_type > m_TheMap
Definition: MovementMap.h:137
IDMap::maxx
int maxx
Definition: MovementMap.h:138
IDMap::SetMapValue
void SetMapValue(unsigned x, unsigned y, a_type p)
Definition: MovementMap.h:143
Landscape::SupplySimAreaHeight
int SupplySimAreaHeight(void)
Gets the simulation landscape height.
Definition: Landscape.h:2302
Landscape::SupplySimAreaWidth
int SupplySimAreaWidth(void)
Gets the simulation landscape width.
Definition: Landscape.h:2297
IDMap::maxy
int maxy
Definition: MovementMap.h:139