Rik's Treehouse > Babbling in Binary > My Software > Orphanware > R2DToo > R2DToo Help > For the Programmer > nbrhdRandom

nbrhdRandom

Declaration
Parameters
Remarks
Example
See Also

Declaration

void __stdcall nbrhdRandom(
	int range,    	// number of neighbours
	bool symmetric	// whether links are symmetric or not
);
Top of page

Parameters

range
Number of links each site has.
symmetric
true if links are symmetric (reciprocal), otherwise false.
Top of page

Remarks

This function is available through the API. It can be called within the model-supplied routine
onSimCreate to set the neighbourhood to a random network in which each agent is connected to range other agents (never itself) selected from anywhere on the lattice (non-local).

If symmetric=true then all links are reciprocal: a is a neighbour of b if and only if b is a neighbour of a. Top of page


Example

void __stdcall setNbrhd(double *param) { nbrhdRandom(4,true); }
Top of page

See Also

onSimCreate, nbrhd1D, nbrhdBlocks, nbrhdCCDM, nbrhdFractal, nbrhdMoore, nbrhdRandomER, nbrhdVonNeumann.
Top of page
[Rik's Office Hours] [Contact Rik]
Last updated: Fri Apr 30 2004, 1:42pm