bk-tree
0.1.4
Header-only Burkhard-Keller tree library
|
Hamming distance metric. More...
#include <bktree.hpp>
Public Member Functions | |
integer_type | compute_distance (std::string_view s, std::string_view t) const |
Public Member Functions inherited from bk_tree::metrics::Distance< HammingDistance > | |
integer_type | operator() (std::string_view s, std::string_view t) const |
Hamming distance metric.
\(d(x, y) = \displaystyle\sum_{i=0}^{n-1} x_i \bigoplus y_i,\) where \(\bigoplus\) is the XOR operator, and \(x\) and \(y\) are of the same length.