Safe Haskell | None |
---|---|
Language | Haskell2010 |
See Permutation
Synopsis
- data Permutation n
- apply :: Permutation n -> List n a -> List n a
- unapply :: Permutation n -> List n a -> List n a
- swap :: Natural n => Fin n -> Fin n -> Permutation n
- orbit :: Natural n => Permutation n -> Fin n -> NonEmpty (Fin n)
- cycles :: forall n. Natural n => Permutation (Succ n) -> NonEmpty (NonEmpty (Fin (Succ n)))
Documentation
data Permutation n Source #
Permutation of n
elements
Any permutation can be expressed as a product of transpositions. Ergo, construct with Semigroup
operations and swap
.