Provides functionality related to permutations. More...
#include "Molassembler/Temple/Traits.h"
#include "Molassembler/Temple/OperatorSuppliers.h"
#include <algorithm>
#include <tuple>
#include <stdexcept>
Go to the source code of this file.
Data Structures | |
struct | Scine::Molassembler::Temple::Permutation |
Container-abstracted permutation. More... | |
Namespaces | |
Scine::Molassembler | |
Central library namespace. | |
Scine::Molassembler::Temple | |
Template shorthands, optimizers and constexpr data types. | |
Functions | |
template<class Container > | |
constexpr std::size_t | Scine::Molassembler::Temple::permutationIndex (const Container &container) |
Calculate the index of permutation of elements in a container. More... | |
template<typename Container > | |
constexpr void | Scine::Molassembler::Temple::inPlaceSwap (Container &data, const std::size_t a, const std::size_t b) |
Index-based in-place swapping of elements in an array-like container. More... | |
template<typename Container > | |
constexpr void | Scine::Molassembler::Temple::inPlaceReverse (Container &data, const std::size_t indexFrom, const std::size_t indexTo) |
Index-based in-place reversal of elements in an array-like container. More... | |
template<typename Container > | |
constexpr bool | Scine::Molassembler::Temple::inPlaceNextPermutation (Container &data, const std::size_t first, const std::size_t last) |
In-place next permutation. More... | |
template<typename Container > | |
constexpr bool | Scine::Molassembler::Temple::inPlaceNextPermutation (Container &data) |
template<typename Container > | |
constexpr bool | Scine::Molassembler::Temple::inPlacePreviousPermutation (Container &data, const std::size_t first, const std::size_t last) |
In-place previous permutation. More... | |
template<typename Container > | |
constexpr bool | Scine::Molassembler::Temple::inPlacePreviousPermutation (Container &data) |
template<class Container > | |
bool | Scine::Molassembler::Temple::next_permutation (Container &container) |
Calls std::next_permutation. | |
template<class Container > | |
bool | Scine::Molassembler::Temple::prev_permutation (Container &container) |
Calls std::prev_permutation. | |
template<class Container > | |
bool | Scine::Molassembler::Temple::nextCombinationPermutation (Container &toPermute, const Container &limits) |
For when you have to implement variable-depth for loops, each with different limits. More... | |
Provides functionality related to permutations.