Permutation
Permutations of indices or lattice sites. Basic building block of a PermutationGroup. Permutations can be multiplied, inverted and raised to a power.
Sources
permutation.hpp
permutation.cpp
permutation.jl
Constructors
From an array
Creates an Permutation out of an array of integers, e.g. {0, 2, 1, 3}. If the input array is of size N then every number between 0 and N-1 must occur exactly once, otherwise the Permutation is invalid.
1-indexing in Julia / 0-indexing in C++
To enumerate the sites of a Permutation, we start counting at 1 in Julia and 0 in C++.
| Name | Description |
|---|---|
| array | array of integers, e.g. |
| list | initializer list of the permutation |
| ptr | pointer to memory as an array |
| size | size of the array |
For identity
Constructs an identity permutation of a given size, e.g. {0, 1, 2, 3}.
| Name | Description |
|---|---|
| size | size of the identity permutation |
Methods
inv
Computes the inverse permutation.
* operator
Concatenates two permutations by overloading the * operator.
^ operator, pow
Raises a permutation to an integer power.
size
Returns the size of a Permutation.
to_string (operator<<)
Converts the Permutation to a readable string representation.