Internal helper used by compute_matrix() and contact_matrix() to
turn a merged contacts table into the rank-2K
array of weighted contact counts. Each grouping contributes a
participant-side and a contact-side axis, in that order across the two
halves of the array.
weighted_matrix_array(contacts, groupings = default_age_groupings())a rank-2K array with K = length(groupings)
the merged contacts data.table (must have
sampled.weight plus the participant/contact columns referenced by
groupings)
a list of grouping triples (see resolve_groupings());
defaults to single-age, matching pre-existing single-grouping output