diff --git a/QtSLiM/help/SLiMHelpClasses.html b/QtSLiM/help/SLiMHelpClasses.html index f7484a03..9ff8a81e 100644 --- a/QtSLiM/help/SLiMHelpClasses.html +++ b/QtSLiM/help/SLiMHelpClasses.html @@ -1007,9 +1007,9 @@

The parameters outputMultiallelics, simplifyNucleotides, and outputNonnucleotides affect the format of the output produced; see the reference documentation for further discussion.

See outputMSSample() and outputSample() for other output formats.  Output is generally done in a late() event, so that the output reflects the state of the simulation at the end of a tick.

– (float)pointDeviated(integer$ n, float point, string$ boundary, numeric$ maxDistance, string$ functionType, ...)

-

Returns a vector containing n points that are derived from point by adding a deviation drawn from a dispersal kernel (specified by maxDistance, functionType, and the ellipsis parameters ...) and then applying a boundary condition specified by boundary.  This method therefore performs the steps of a simple dispersal algorithm in a single vectorized call.

+

Returns a vector containing n points that are derived from point by adding a deviation drawn from a dispersal kernel (specified by maxDistance, functionType, and the ellipsis parameters ..., as detailed below) and then applying a boundary condition specified by boundary.  This method therefore performs the steps of a simple dispersal algorithm in a single vectorized call.

The parameter point may contain a single point which is deviated and bounded n times, or may contain n points each of which is deviated and bounded.  In any case, each point in point should match the dimensionality of the model – one element in a 1D model, two elements in a 2D model, or three elements in a 3D model.  This method should not be called in a non-spatial model.

-

The dispersal kernel is specified similarly to other kernel-based methods, such as setInteractionFunction() and smooth(); see the InteractionType class documentation for detailed discussion of the available spatial kernel types and their parameters (supplied in the ellipsis, ...).  For pointDeviated(), the Cauchy ("c") kernel is not allowed since it is not well-behaved for this purpose, and the Student’s t ("t") kernel is not allowed in 3D models at present simply because it hasn’t been implemented.  The random points returned from this method are drawn from the probability distribution that is radially symmetric and has density proportional to the interaction strength – in other words, at distance r the density is proportional to the functional form referred to by functionType.  For instance, the density of the probability distribution for type "e" with rate a at distance r is proportional to exp(−ra); and so the distribution of the distance in 1D is exponential, while in 2D it is proportional to r exp(−ra) (i.e., Gamma with shape parameter 1).

+

The dispersal kernel is specified similarly to other kernel-based methods, such as setInteractionFunction() and smooth().  For pointDeviated(), functionType may be “f" with no ellipsis arguments ... to use a flat kernel out to maxDistance; “l" with no ellpises arguments for a kernel that decreases linearly from the center to zero at maxDistance; "e", in which case the ellipsis should supply a numeric$ lambda (rate) parameter for a negative exponential function; "n", in which case the ellipsis should supply a numeric$ sigma (standard deviation) parameter for a Gaussian function; or "t", in which case the ellipsis should supply a numeric$ degrees of freedom and a numeric$ scale parameter for a t-distribution function.  The Cauchy ("c") kernel is not supported by pointDeviated() since it is not well-behaved for this purpose, and the Student’s t ("t") kernel is not allowed in 3D models at present simply because it hasn’t been implemented.  See the InteractionType class documentation (section 25.8) for more detailed discussion of the available kernel types and their parameters and probability distribution functions.  The random points returned from this method are drawn from the probability distribution that is radially symmetric and has density proportional to the kernel – in other words, at distance r the density is proportional to the kernel type referred to by functionType.  For instance, the density of the probability distribution for type "e" with rate a at distance r is proportional to exp(−ra); and so the distribution of the distance in 1D is exponential, while in 2D it is proportional to r exp(−ra) (i.e., Gamma with shape parameter 1).

The boundary condition must be one of "none", "periodic", "reflecting", "stopping", or "reprising".  For "none", no boundary condition is enforced; the deviated points are simply returned as is.  For "periodic", "reflecting", and "stopping", the boundary condition is enforced just as it is by the pointPeriodic(), pointReflected(), and pointStopped() methods; see their documentation for further details.  For "reprising", if the deviated point is out of bounds a new deviated point will be chosen, based upon the same original point, until a point inside bounds is obtained.  Note that absorbing boundaries (for which being out-of-bounds is lethal) would be implemented in script; this method cannot enforce them.

In the typical usage case, point comes from the spatialPosition property for a vector of individuals, and the result is then set back onto the same vector of individuals using the setSpatialPosition() method; however, this method might be useful in other situations too.

– (logical)pointInBounds(float point)

diff --git a/SLiMgui/SLiMHelpClasses.rtf b/SLiMgui/SLiMHelpClasses.rtf index 17b91592..156052e1 100644 --- a/SLiMgui/SLiMHelpClasses.rtf +++ b/SLiMgui/SLiMHelpClasses.rtf @@ -9159,7 +9159,7 @@ The parameters \f3\fs18 functionType \f4\fs20 , and the ellipsis parameters \f3\fs18 ... -\f4\fs20 ) and then applying a boundary condition specified by +\f4\fs20 , as detailed below) and then applying a boundary condition specified by \f3\fs18 boundary \f4\fs20 . This method therefore performs the steps of a simple dispersal algorithm in a single vectorized call.\ The parameter @@ -9175,21 +9175,49 @@ The dispersal kernel is specified similarly to other kernel-based methods, such \f3\fs18 setInteractionFunction() \f4\fs20 and \f3\fs18 smooth() -\f4\fs20 ; see the -\f3\fs18 InteractionType -\f4\fs20 class documentation for detailed discussion of the available spatial kernel types and their parameters (supplied in the ellipsis, -\f3\fs18 ... -\f4\fs20 ). For +\f4\fs20 . For \f3\fs18 pointDeviated() -\f4\fs20 , the Cauchy ( +\f4\fs20 , +\f3\fs18 functionType +\f4\fs20 may be +\f3\fs18 \'93f" +\f4\fs20 with no ellipsis arguments +\f3\fs18 ... +\f4\fs20 to use a flat kernel out to +\f3\fs18 maxDistance +\f4\fs20 ; +\f3\fs18 \'93l" +\f4\fs20 with no ellpises arguments for a kernel that decreases linearly from the center to zero at +\f3\fs18 maxDistance +\f4\fs20 ; +\f3\fs18 "e" +\f4\fs20 , in which case the ellipsis should supply a +\f3\fs18 numeric$ +\f4\fs20 lambda (rate) parameter for a negative exponential function; +\f3\fs18 "n" +\f4\fs20 , in which case the ellipsis should supply a +\f3\fs18 numeric$ +\f4\fs20 sigma (standard deviation) parameter for a Gaussian function; or +\f3\fs18 "t" +\f4\fs20 , in which case the ellipsis should supply a +\f3\fs18 numeric$ +\f4\fs20 degrees of freedom and a +\f3\fs18 numeric$ +\f4\fs20 scale parameter for a +\f1\i t +\f4\i0 -distribution function. The Cauchy ( \f3\fs18 "c" -\f4\fs20 ) kernel is not allowed since it is not well-behaved for this purpose, and the Student\'92s +\f4\fs20 ) kernel is not supported by +\f3\fs18 pointDeviated() +\f4\fs20 since it is not well-behaved for this purpose, and the Student\'92s \f1\i t \f4\i0 ( \f3\fs18 "t" -\f4\fs20 ) kernel is not allowed in 3D models at present simply because it hasn\'92t been implemented. The random points returned from this method are drawn from the probability distribution that is radially symmetric and has density proportional to the interaction strength \'96 in other words, at distance +\f4\fs20 ) kernel is not allowed in 3D models at present simply because it hasn\'92t been implemented. See the +\f3\fs18 InteractionType +\f4\fs20 class documentation (section 25.8) for more detailed discussion of the available kernel types and their parameters and probability distribution functions. The random points returned from this method are drawn from the probability distribution that is radially symmetric and has density proportional to the kernel \'96 in other words, at distance \f1\i r -\f4\i0 the density is proportional to the functional form referred to by +\f4\i0 the density is proportional to the kernel type referred to by \f3\fs18 functionType \f4\fs20 . For instance, the density of the probability distribution for type \f3\fs18 "e"