Given a list (or matrix) of generated numeric ID codes, this function does a crosswise comparison. It compares the 'Hamming distance' between every pair of given ID sequences, then returns a contingency table with the frequency of Hamming distances found. These Hamming distances represent how robust the coding scheme is to erasure errors. If a particular robustness to erasure is desired, there should be no distances equal to or lower than that robustness.
a list of numeric ID sequences generated by
a named, flattened list that contains a contingency table with the frequency of crosswise Hamming distances
Andrew Burchill, email@example.com
For information on Hamming distances.
For information on erasure coding.
Burchill, A. T., & Pavlic, T. P. (2019). Dude, where's my mark? Creating robust animal identification schemes informed by communication theory. Animal Behaviour, 154, 203-208. doi:10.1016/j.anbehav.2019.05.013
1 2 3 4 5 6 7 8 9
#Let's generate some unique IDs given: total.length <- 4 #we have four positions to mark, redundancy <- 2 #we're interested in being robust to two erasures, alphabet <- 5 #and we currently have five types of color bands in stock codes <- rs_IDs(total.length, redundancy, alphabet) #Given that we specified a robustness of 2, #there should be no counts of "dist.2" or lower how_robust(codes)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.