• Preparing search index...
  • The search index is not available
iteragain - v4.1.5
  • iteragain
  • permutations
  • permutations

Function permutations

  • permutations<T, Size>(size): ((arg: T) => IterableIterator<Tuple<IterSource<T>, Size>>)
  • Returns all successive size length permutations of the input iterator. The permutations are emitted in lexicographic ordering according to input. So if input is sorted, the permutations will be in sorted order. Elements in the permutations are treated as unique based on their position in the iterator, not on their value. So if the input iterator is unique, then there will be no repeat values.

    Type Parameters

    • T extends IteratorOrIterable<any>
    • Size extends number

    Parameters

    • size: Size

      The size of each permutation, must be greater than 0 and less than or equal to the length of the input

    Returns ((arg: T) => IterableIterator<Tuple<IterSource<T>, Size>>)

      • (arg): IterableIterator<Tuple<IterSource<T>, Size>>
      • Parameters

        • arg: T

        Returns IterableIterator<Tuple<IterSource<T>, Size>>

    See

    https://docs.python.org/3/library/itertools.html#itertools.permutations for more info.

    • Defined in permutations.ts:14
  • permutations<T, Size>(arg, size): IterableIterator<Tuple<IterSource<T>, Size>>
  • Type Parameters

    • T extends IteratorOrIterable<any>
    • Size extends number

    Parameters

    • arg: T
    • size: Size

    Returns IterableIterator<Tuple<IterSource<T>, Size>>

    • Defined in permutations.ts:17

Settings

Member Visibility
iteragain - v4.1.5
  • Loading...

Generated using TypeDoc