hamming: Hamming distance

Description Usage Arguments Details Value

Description

The Hamming distance is the number of positions where the values are different.

Usage

1
hamming(x, y)

Arguments

x, y

Numeric vectors.

Details

For vectors x and y, the Hamming distance is defined as

d(x, y) = ∑_i [x_i \neq y_i],

where the quantity in the brackets is 1 if the elements are not equal, and zero if the elements are equal. Relation to other definitions:

Value

The Hamming distance between x and y.


abdiv documentation built on Jan. 20, 2020, 5:07 p.m.