Declaration Parameters Remarks Example See Also
| Declaration
void __stdcall nbrhdFractal(
int xRange, // horizontal range
int yRange, // vertical range
bool uplink, // are my ancestors my neighbours?
bool downlink // are my descendents my neighbours?
);

Parameters
- xRange, yRange
- Range of neighbourhood in horizontal and vertical directions, respectively.
- uplink, downlink
- Determines whether links are propagated up the fractal structure to the root or down to the leaves, or both. (Why computer scientists don't make good gardeners: they plant all their trees upside down!)

Remarks
This function is available through the API. It can be called within the model-supplied routine onSimCreate to generate a deterministic, scale-free network. The grid is divided into blocks of xRange×yRange sites linked to their "parents" (the top left site in each block). This pattern is repeated with blocks of xRange2yRange2 and so on, up to the system size, when the uppermost left site is linked to all other sites of the lattice. By definition this creates a scale-free (power law) distribution of links.

Sample neighbourhood structure for xRange=yRange=2.

Example
void __stdcall setNbrhd(double *param)
{
// clustered, scale-free network
nbrhdBlocks(2,3); // clustered
nbrhdFractal(2,3,true,true); // scale-free
}

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