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

Function permutations

  • permutations<T extends IteratorOrIterable<any>>(
        arg: T,
    ): IterableIterator<IterSource<T>[]>

    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>

    Parameters

    • arg: T

      The input iterator.

    Returns IterableIterator<IterSource<T>[]>

    See

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

    • Defined in src/permutations.ts:14
  • permutations<T extends IteratorOrIterable<any>, Size extends number>(
        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>>

    See

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

    • Defined in src/permutations.ts:15
  • permutations<T extends IteratorOrIterable<any>, Size extends number>(
        arg: T,
        size: Size,
    ): 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

    • arg: T

      The input iterator.

    • size: Size

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

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

    See

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

    • Defined in src/permutations.ts:18

Settings

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

Generated using TypeDoc