perm-vec
Provides a Perm type for permuting vectors of data.
[]
= "0.1"
It is a very common practice in programming to work with arrays holding reordered indices of something. (e.g. the indices into an array that sort it by some field, or that change it to match some different ordering convention). While this is often done in an entirely ad-hoc manner, these indices actually satisfy a great deal of frequently-overlooked mathematical properties that can make reasoning about them much much easier.
Perm is a type which implements many of these properties.
use ;
Various methods are provided for calculating things like:
- The inverse of a permutation.
- Integer powers of a permutation.
- Direct sums.
- Direct products.
License
Licensed under the Apache License, Version 2.0 http://www.apache.org/licenses/LICENSE-2.0 or the MIT license http://opensource.org/licenses/MIT, at your option. This file may not be copied, modified, or distributed except according to those terms.