PermutationDescriptor.reverse constructor

PermutationDescriptor.reverse(
  1. int length
)

Creates a permutation that reverses length elements.

Implementation

factory PermutationDescriptor.reverse(int length) => PermutationDescriptor(
    List<int>.generate(length, (index) => length - index - 1));