Polarith AI
1.8

◆ GetNeighbourID()

int GetNeighbourID ( int  id,
int  targetNeighbour 
)

Recursively gets the neighbour ID at the specified place targetNeighbour .

If negative, it looks for the appropriate preceding neighbour, and if positive, it looks for the appropriate succeeding neighbour.

Parameters
idThe ID of the receptor for starting the recursive neighbourhood walk-through.
targetNeighbourThe specified place to obtain the neighbour ID for.
Returns
The found neighbour ID is returned if there is one. Otherwise, if no neighbour at the place targetNeighbour exists, -1 is returned.
Exceptions
ArgumentOutOfRangeExceptionIf id does not point to a valid receptor.
Imprint