Function randomSubset

  • Pick an arbitrary subset.

    Returns

    [[kᵢ, kⱼ, ...], [vᵢ, vⱼ, ...]] | kᵢ, kⱼ, ... ∈ x[0]; vᵢ, vⱼ, ... ∈ x[1]; |[kᵢ, kⱼ, , ...]| = |x| if n<0 else n

    Type Parameters

    • K

    • V

    Parameters

    • x: Lists<K, V>

      lists

    • n: number = -1

      number of entries [-1 ⇒ any]

    • fr: ReadFunction<number> = Math.random

      random number generator ([0, 1))

    Returns Lists<K, V>

Generated using TypeDoc