A flexible setup function for mosquito dispersal. The first
argument Kname can be either a matrix, the name of a method, or a list of options that
includes a method name:
if
Knameis a string of characters, it dispatches the methodif
Knameis a matrix, then a matrix is set upif
Knameis a list of options, then dispatching is onKname$name
the method dispatches on class(options)
Options for Kname are:
is.matrix(Kname): if the user passes a matrix, thenclass(Kname) <- "as_matrix"Kname = "no_setup"– thexdsobject is returned unmodifiedKname = "zero"– set up a matrix of all zerosKname = "as_matrix"– calls change_K_matrix and passesK_matrixKname = "herethere"– calls make_K_matrix_herethereKname = "xy"– calls make_K_matrix_xy
Usage
setup_K_matrix(Kname, xds_obj, options = list(), s = 1)