|
Graphite Version 3
An experimental 3D geometry processing program
|
Functions to manipulate permutations. More...
#include <geogram/basic/common.h>#include <geogram/basic/numeric.h>#include <geogram/basic/memory.h>Go to the source code of this file.
Namespaces | |
| namespace | GEO |
| Global Vorpaline namespace. | |
| namespace | GEO::Permutation |
| Utilities for manipulating permutations. | |
Functions | |
| bool | GEO::Permutation::is_valid (const vector< index_t > &permutation) |
| Checks whether a vector is a valid permutation. | |
| void | GEO::Permutation::mark (vector< index_t > &permutation, index_t i) |
| Marks a permutation element as visited. | |
| bool | GEO::Permutation::is_marked (const vector< index_t > &permutation, index_t i) |
| Checks if a permutation element has been visited. | |
| void | GEO::Permutation::unmark (vector< index_t > &permutation, index_t i) |
| Unmarks a permutation element. | |
| void | GEO::Permutation::apply (void *data, const vector< index_t > &permutation_in, size_t elemsize) |
Applies a permutation in-place. Permutes the first N elements of size elemsize in array data using permutation permutation where N is the number of elements in permutation. The result of the permutation is left in data. The array data must contain at least permutation.size() elements otherwise memory corruption will happen. | |
| template<class T > | |
| void | GEO::Permutation::apply (vector< T > &data, const vector< index_t > &permutation_in) |
Applies a permutation in-place. Permutes the first N elements of vector data using permutation permutation where N is the number of elements in permutation. The result of the permutation is left in data. The array data must contain at least permutation.size() elements otherwise the function throws an out_of_range exception. | |
| void | GEO::Permutation::invert (vector< index_t > &permutation) |
| Inverts a permutation in-place. | |
| void | GEO::Permutation::invert (const vector< index_t > &permutation, vector< index_t > &invert) |
| Inverts a permutation. | |
Functions to manipulate permutations.
Definition in file permutation.h.