[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

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.1.71latest

Version History

VersionDownloads (Last 7 Days)Published
1.1.71
1.1.61
1.1.41
1.1.39
1.1.28
1.1.18
1.1.08
1.0.68
1.0.48
1.0.29
1.0.17
1.0.08

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