buildReverse: Map from Label Pairs to Indices

View source: R/auxiliary.R

buildReverseR Documentation

Map from Label Pairs to Indices

Description

Builds a map from pairs of labels to indexes. This is for caching distances, to avoid recomputing Hamming distances especially when dealing with high-dimensional (large P) matrices.

Usage

buildReverse(N)

Arguments

N

Sample size, i.e., nrow(\mathbf{X})

Details

Dependencies: None

Value

N \times N matrix whose entries record the index corresponding to the pair of labels (indexed by the matrix dims)


flintyR documentation built on March 31, 2023, 8:19 p.m.