Fast Computation of Pairwise Hamming Distances
Overview
Pairwise Hamming distances are computed between the rows of a binary (0/1) matrix using highly optimized 'C' code. The input is an integer matrix where each row represents a binary feature vector and returns a symmetric integer matrix of pairwise distances. Internally, rows are bit-packed into 64-bit words for fast XOR-based comparisons, with hardware-accelerated popcount operations to count differences. 'OpenMP' parallelization ensures efficient performance for large matrices.
Install
Health
- OK13 OK2026-08-23
- WARNING12 OK, 1 WARNING2026-08-21
- OK13 OK2026-08-05
- NOTE12 OK, 1 NOTE2026-08-01
- OK14 OK2026-03-10
Documentation
- Help pages
- 1
- Examples that run
- 0%1 only when donttest examples are enabled (R CMD check --as-cran)
- Exported functions with examples
- 100%
- Documented parameters
- 100%
- Return-value docs
- 100%
- Help pages citing references
- 0%
Downloads
Dependencies
Installing FastHamming adds no packages beyond those that come with R.
Code & Tests
People & History
Package metadata
- First published
- 2025-04-25
- Total releases
- 3 / 1 yrs
- License
- GPL-3 OSI
- Minimum R
- ≥ 4.0.0
- Download size
- 3.5 KB
Cite
Cite this package
Run in R for the authors' preferred citation:
citation("FastHamming")This package has no citation file, so citation() returns this entry built from DESCRIPTION.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-23, which the citation names so these numbers can be found later. More on citing and the projects behind them.