Caddy
A 2005 Roborodentia entry with vision and path planning capability
|
Iterative (non-recursive!) permutation generator. More...
#include <stdint.h>
#include <stdbool.h>
Go to the source code of this file.
Functions | |
bool | generateNextPermutation (uint8_t *first, uint8_t *last) |
Reorder an array of values to the next higher permutation. |
Iterative (non-recursive!) permutation generator.
Definition in file permutation.h.
bool generateNextPermutation | ( | uint8_t * | first, |
uint8_t * | last | ||
) |
Reorder an array of values to the next higher permutation.
The "next higher" permuation is the one that is lexicographically one step higher than the input order. The order that would compare smaller to all other permutations is the one in which all elements are sorted in ascending order. This is the initial order that should be used in order to cycle through all possible permutations.
Typical usage example:
Definition at line 22 of file permutation.c.