Main Overview

# Class `Perm`

Class `Perm`
Permutations (from dictionary or cycle representation) Examples (three times the same permutation:
`Perm({1:4, 2:3, 3:2, 4:1})`
`Perm("(1,4)(2,3)")`
`Perm([[1,4],[2,3]])`

Overview:

## Constructor

Perm (p)

## Operators

Operator | Meaning
x[i] |
x * y |
str(x) |

## Object Methods

Method | Meaning
check () | check for consistency
cycles () | Cycle representation
fromVector (v) | Generation from vector v with argument/value pairs.
inverse () | inverse permutation
inversions () | Inversion number (count of "swapped pairs")
members () | List of the permuted elements
odd () | odd permutation?
reduce () | removes fixed points
sign () | signum

# Constructor

### Perm

Constructor

Usage: `Perm(p)`

# Operators

### x[i]

Usage: `x[i]`

### x * y

product of two Permutationen (left first, then right!)

Usage: `x * y`

Description:

### str(x)

Object representation as string (as cycles)

Usage: `str(x)`

Description:

# Object Methods

### check

p.check()

Usage: `self.check()`

Description:
check for consistency

### cycles

p.cycles()

Usage: `self.cycles()`

Description:
Cycle representation

### fromVector

p.fromVector(v)

Usage: `self.fromVector(v)`

Description:
Generation from vector v with argument/value pairs.
Example: `p.fromVector([[1,4],[2,3]])`

### inverse

p.inverse()

Usage: `self.inverse()`

Description:
inverse permutation

### inversions

p.inversions()

Usage: `self.inversions()`

Description:
Inversion number (count of "swapped pairs")

### members

p.members()

Usage: `self.members()`

Description:
List of the permuted elements

### odd

p.odd()

Usage: `self.odd()`

Description:
odd permutation? (bool)

### reduce

p.reduce()

Usage: `self.reduce()`

Description:
removes fixed points

### sign

p.sign()

Usage: `self.sign()`

Description:
signum
1 for even, -1 for odd permutations