Documentation for SLiM function sampleImprovedNearbyPoint
, which is a
method of the SLiM class SpatialMap
.
Note that the R function is a stub, it does not do anything in R (except bring
up this documentation). It will only do
anything useful when used inside a slim_block
function further
nested in a slim_script
function call, where it will be translated into valid SLiM code as part of a
full SLiM script.
sampleImprovedNearbyPoint(point, maxDistance, functionType, ...)
An object of type float. See details for description.
An object of type float. Must be of length 1 (a singleton). See details for description.
An object of type string. Must be of length 1 (a singleton). See details for description.
An object of type NA. NA See details for description.
An object of type float.
Documentation for this function can be found in the official SLiM manual: page 716.
This variant of sampleNearbyPoint() samples a Metropolis-Hastings move on the spatial map. See sampleNearbyPoint() for discussion of the basic idea. This method proposes a nearby point drawn from the given kernel. If the drawn point has a larger map value than the original point, the new point is returned. If the drawn point has a smaller map value than the original point, it is returned with a probability equal to the ratio between its map value and the original map value, otherwise the original point is returned. The distribution of individuals that move (or not) to new locations governed by this method will converge upon the map itself, in a similar manner to how MCMC converges upon the posterior distribution (assuming no other forces, such as birth or death, influence the distribution of individuals). Movement governed by this method is "improved" in the sense that individuals will tend to remain where they are unless the new sampled point is an improvement for them - a higher map value. Note that unlike sampleNearbyPoint(), this method requires that all map values are non-negative.
This is documentation for a function in the SLiM software, and has been reproduced from the official manual, which can be found here: http://benhaller.com/slim/SLiM_Manual.pdf. This documentation is Copyright © 2016-2020 Philipp Messer. All rights reserved. More information about SLiM can be found on the official website: https://messerlab.org/slim/
Other SpatialMap:
SpatialMap
,
add()
,
blend()
,
changeColors()
,
changeValues()
,
divide()
,
exp()
,
gridValues()
,
interpolate()
,
mapColor()
,
mapImage()
,
mapValue()
,
multiply()
,
power()
,
range()
,
rescale()
,
sampleNearbyPoint()
,
smooth()
,
subtract()