[go: up one dir, main page]

@extra-array/hamming-distance

1.1.7 • Public • Published

Get Hamming distance between arrays.

const hammingDistance = require('@extra-array/hamming-distance');
// hammingDistance(<array1>, <array2>, [begin0=0], [end0], [begin1=0], [end1])

hammingDistance([0, 1, 0], [1, 1, 1]);
// 2
hammingDistance([2, 1, 7, 3, 8, 9, 6], [2, 2, 3, 3, 7, 9, 6]);
// 3
hammingDistance(['richard', 'hamming'], ['richard']);
// NaN (array lengths are not equal)

With extra-array try Array.hammigDistance() instead.


extra-array

Package Sidebar

Install

npm i @extra-array/hamming-distance

Weekly Downloads

74

Version

1.1.7

License

MIT

Unpacked Size

2.75 kB

Total Files

4

Last publish

Collaborators

  • wolfram77