Learn R Programming

spatstat.geom (version 3.2-5)

hotrod: Heat Kernel for a One-Dimensional Rod

Description

Calculate values of the heat kernel on a one-dimensional rod. The ends of the rod may be assumed to be insulated, or absorbing.

Usage

hotrod(len, xsource, xquery, sigma, ends=c("insulated", "absorbing"), nmax=20)

Value

Number or numeric vector.

Arguments

len

Length of the rod. A single number or numeric vector.

xsource

Positions of the source points, from the left end of the rod (in the same distance units as len). A single number or numeric vector.

xquery

Positions of the query points, from the left end of the rod (in the same distance units as len). A single number or numeric vector.

sigma

Bandwidth for kernel. A single number or a numeric vector.

ends

Character string (partially matched) specifying whether the ends of the rod are assumed to be insulated or absorbing.

nmax

Number of terms in the infinite sum to use. A single integer or an integer vector.

Author

Greg McSwiggan and Adrian Baddeley Adrian.Baddeley@curtin.edu.au.

Details

Computes the heat kernel as an infinite sum.

Examples

Run this code
  curve(hotrod(1, 0.1, x, 0.7))

  # check it's a probability density
  f <- function(x) hotrod(1, 0.1, x, 0.7)
  integrate(f, 0, 1)

  ## absorbing ends
  curve(hotrod(1, 0.1, x, 0.7, ends="a"))

Run the code above in your browser using DataLab