Learn R Programming

MRIaggr (version 1.1.5)

calcBlockW_cpp: Find disjoint spatial blocks of sites

Description

C++ function called by calcBlockW to identify independant spatial blocks of sites according to a neighbourhood matrix.

Usage

calcBlockW_cpp(W_i, W_p, site_order, dist_center, dist_max, verbose)

Arguments

W_i
the 0-based row numbers for each non-zero element in the sparse neighbourhood matrix. integer vector.
W_p
the pointers to the initial (zero-based) index of elements in the colum of the sparse neighbourhood matrix. integer vector.
site_order
a specific order to go all over the sites. integer vector.
dist_center
the distance between each point and a reference point. numeric vector.
dist_max
the neighbourhood range. numeric vector.
verbose
Should the process be verbose over iterations ? logical.