tut_StaticPop

The class tut_StaticPop is derived from SPopulation. I is the simplest and most trivial population class in QHG: it does nothing - agents don move, die or give birth. According to the Talking Heads <https://www.youtube.com/watch?v=sZpZuIWu1tw> this is heaven…

Since this class is so simple, its implementation is, too: it only implements a constructor. It also does not define its own agent class - it uses the agents defined for SPopulation.

(The class tut_StaticPop is described in detail in the :ref:first part<TutorialStatic_ref>` of the tutorial).

Code:

Public Methods

constructor

tut_StaticPop(SCellGrid *pCG, PopFinder *pPopFinder, int iLayerSize,
              IDGen **apIDG, uint32_t *aulState, uint *aiSeeds);
pCG

Pointer to the cell grid the simulation runs on.

pPopFinder

A pointer to an instance of a PopFinder population container.

iLayerSize

The layer size used by the agent management system.

apIDG

An array of pointers to the ID generators, one for each thread.

aulState

An array of uint used to initalize the WELL512 random number generators.

aiSeeds

Seeds for other WELL512 instances not used for moving and breeding, e.g. for genetics.

All this constructor does is to call the constructor of its parent class SPopulation.