Neverending Plethora of Modules

    array-hammingdistance

    0.1.7 • Public • Published

    array-hammingdistance

    NOTE: array-hammingdistance was renamed to @extra-array/hamming-distance. NPM

    Get Hamming distance between arrays.

    const hammingDistance = require('array-hammingdistance');
    // 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)

    Install

    npm i array-hammingdistance

    DownloadsWeekly Downloads

    6

    Version

    0.1.7

    License

    MIT

    Unpacked Size

    1.7 kB

    Total Files

    3

    Last publish

    Collaborators

    • wolfram77