Stay organized with collections
Save and categorize content based on your preferences.
C++ Reference: sparse_permutation
Note: This documentation is automatically generated.
A compact representation for permutations of {0..N-1} that displaces few elements: it needs only O(K) memory for a permutation that displaces K elements.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-08-06 UTC."],[[["\u003cp\u003e\u003ccode\u003esparse_permutation\u003c/code\u003e in C++ offers a memory-efficient way to represent permutations where only a few elements are displaced.\u003c/p\u003e\n"],["\u003cp\u003eIt achieves this by requiring only O(K) memory for a permutation displacing K elements, making it suitable for large datasets with limited changes.\u003c/p\u003e\n"],["\u003cp\u003eThe main class associated with this functionality is \u003ccode\u003eSparsePermutation\u003c/code\u003e, providing tools and methods for working with this specific type of permutation.\u003c/p\u003e\n"]]],["The content describes a `SparsePermutation` class in C++ designed for representing permutations of elements {0..N-1}. It offers a memory-efficient approach, requiring only O(K) memory for permutations that displace K elements. The documentation highlights that this is a compact representation suitable when dealing with permutations that move a relatively small subset of the total elements. The `SparsePermutation` class is the key component discussed.\n"],null,["# sparse_permutation\n\nC++ Reference: sparse_permutation\n=================================\n\n\nNote: This documentation is automatically generated.\n\n\u003cbr /\u003e\n\nA compact representation for permutations of {0..N-1} that displaces few elements: it needs only O(K) memory for a permutation that displaces K elements.\n\n| Classes ------- ||\n|----------------------------------------------------------------------------------------------|---|\n| [SparsePermutation](/optimization/reference/algorithms/sparse_permutation/SparsePermutation) |"]]