Skip to main content
4 events
when toggle format what by license comment
Apr 13, 2020 at 13:57 vote accept geoffrey
Apr 13, 2020 at 12:25 comment added Henrik Schumacher I know. Btw., calling SparseArray and PermutationList without a second argument is asking for trouble. And Map and friends are slow. ;)
Apr 13, 2020 at 12:22 comment added Roman You don't even need to define n if you do SparseArray@MapIndexed[{#2[[1]], #1} -> 1 &, PermutationList[Cycles[{{2, 4}}]]].
Apr 13, 2020 at 12:15 history answered Henrik Schumacher CC BY-SA 4.0