Rik's Treehouse > Babbling in Binary > My Software > Orphanware > R2DToo > R2DToo Help > For the Programmer > nbrhdMoore |
Declaration Parameters Remarks Example See Also | Declarationvoid __stdcall nbrhdMoore( int range, // range of neighbourhood int boundaryType // type of boundary on world ); ![]() Parameters
![]() RemarksThis function is available through the API. It can be called within the model-supplied routine onSimCreate to set the neighbourhood of each agent to a Moore neighbourhood of range range. This consists of all sites reachable within range steps up, down, or diagonally (forming a square of side 2×range+1 excepting the center cell).The neighbours are indexed from left to right and top to bottom. For example, if range=1 the neighbour indices of agent a are
BoundariesBoundaries are handled by the boundaryType parameter which may be one of the following:![]() Example![]() See AlsoonSimCreate, nbrhd1D, nbrhdBlocks, nbrhdCCDM, nbrhdFractal, nbrhdRandom, nbrhdRandomER, nbrhdVonNeumann. |
[Rik's Office Hours] [Contact Rik] Last updated: Fri Apr 30 2004, 1:41pm |