Function jaccardIndex

  • Category

    Get the Jaccard index of 2 Sets.

    Time complexity: O(n)

    Space complexity: O(1)

    Type Parameters

    • T

    Parameters

    • a: ReadonlySet<T>

      First Set

    • b: ReadonlySet<T>

      Second Set

    Returns number

    The Jaccard index of a and b

    Set