Declaration Parameters Remarks Example See Also
| Declaration
void __stdcall nbrhdRandomER(
float linksPerNode, // average number of neighbours for each site
bool symmetric // whether links are symmetric or not
);

Parameters
- linksPerNode
- Number of links (neighbours) each site has, an average.
- symmetric
- true if links are symmetric (reciprocal), otherwise false.

Remarks
This function is available through the API. It can be called within the model-supplied routine setNbrhd to set the neighbourhood to an Erdos-Renyi random graph in which each agent is randomly connected to other agents (never itself) selected from anywhere on the lattice (non-local). The probability of a link between any two agents is linksPerNode/(N-1) where N is the number of agents in the simulation.
If symmetric=true then all links are reciprocal: a is a neighbour of b if and only if b is a neighbour of a. Otherwise the links are directed.

Example
void __stdcall setNbrhd(double *param)
{
nbrhdRandomER(1.5,true);
}

See AlsoonSimCreate, nbrhd1D, nbrhdBlocks, nbrhdCCDM, nbrhdFractal, nbrhdMoore, nbrhdRandom, nbrhdVonNeumann. |