R/vignettes/initial_tests.Rmd
initial_tests.Rmdswf.clumper.regular simulates iteratively changes in SWF habitat within a spatial matrix. It takes a matrix where swfCat category represents habitat and agriCat represents non-habitat. Then it applies a clumping algorithm to rearrange habitat cells to form larger, more connected patches. Pixels can only change in the direction agriCat –> swfCat. Other categories do not move.
Hmatrix A matrix representing the initial habitat state.swfCat Integer representing habitat category in the matrix.agriCat Integer representing non-habitat category in the matrix.foreCat Integer representing fores (habitat) category in the matrix.Q Integer representing the number of cells to be moved in each kernel per iteration.iterations Number of iterations for the aggregation process.kernelCl Vertical size of the kernel for processing.kernelRw Horizontal size of the kernel for processing.NNeighbors Threshold of neighbours in a kernel below which habitat pixels are moved in a kernel.maxDistance Searching radius for habitat pixel aggregation.Density Strategy for selecting the cell as a gravity center. “H” to choose area with high habitat cover, “L” from low, “M” for median density.queensCase If TRUE, all 8 directions are considered for neighbors; if FALSE, only orthogonal neighbors are considered.np Number of cores for parallel processing.deBug If TRUE, debugging information is provided.