For each cell of design_matrix, counts neighbours on rings of radius
dists whose value equals the cell's own, weighted by weights.
Implemented by stacking shifted copies of the matrix once per offset.
Arguments
- design_matrix
Design matrix
- dists
A vector of positive integers, ring radii to score over.
- weights
Per-ring weights; must align with
dists.- ring_type
Ring shape:
"manhattan"(default; diamond ring) or"chebyshev"(square ring). Seering_offsets().- relationship
Optional pairwise-relationship lookup produced by
prep_relationship(). When supplied, each neighbour pair contributesrelationship[cell, neighbour]rather than1for matches and0otherwise. NA-padded cells off the design edge contribute0. Defaults toNULL, which keeps the strict identity match. Pass the raw matrix throughprep_relationship()first; the score functions consume only the prepped form.