permoot/
lib.rs

1#![cfg_attr(not(feature = "std"), no_std)]
2#![cfg_attr(all(doc, rustc_channel = "nightly"), feature(doc_auto_cfg))]
3#![doc = include_str!("../README.md")]
4#![warn(missing_docs)]
5
6pub use crate::sign::PermutationSign;
7
8mod util;
9
10/// Errors and related types
11pub mod error;
12mod sign;
13
14/// The main type, representing a rearrangement of `N` objects.
15#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)]
16pub struct Permutation<const N: usize> {
17	arr_repr: [usize; N],
18}
19
20mod math;
21#[cfg(feature = "rand")]
22mod rand_impl;
23/// Different representations for a permutations
24pub mod reprs;
25/// Functionality related to sorting an array or a slice
26pub mod sort;