This function modifies a habitat matrix to increase the cover of a specified category (swfCat) by clumping it within a defined kernel size, considering neighbor preferences and optionally reducing the selection by a given factor.
swf.molder(
Hmatrix,
swfCover = 0.1,
swfCat,
agriCat,
Q,
ExpPriority = "mixed",
ExpDirection = "orthogonal",
reduceTo = 0,
iterations = 20,
kernelCl = 20,
kernelRw = 20,
NNeighbors = 0,
maxDistance = 1,
queensCase = FALSE,
maxGDistance = NULL,
np = 1,
deBug = FALSE
)
A matrix representing the initial habitat state.
The desired cover proportion for the swfCat category.
The category value in the matrix to be increased.
The category value in the matrix considered as non-habitat.
The number of cells to be potentially modified in each iteration.
A factor by which to reduce the selection of cells during processing.
The number of iterations to run the modification process.
The number of columns in the kernel (clumping window).
The number of rows in the kernel (clumping window).
The number of neighbor cells to consider for potential habitat clumping.
The maximum distance to look for neighbor cells.
Logical; if TRUE, considers all 8 directions for neighbors; if FALSE, only orthogonal.
Number of cores for parallel processing.
Logical; if TRUE, prints debugging information during processing.
Function to determine the prioritization of diagonal neighbors.
A list of matrices representing the state of the habitat matrix after each iteration.