Stay organized with collections
Save and categorize content based on your preferences.
C++ Reference: dynamic_partition
Note: This documentation is automatically generated.
TODO(user): refine this toplevel comment when this file settles.
Two dynamic partition classes: one that incrementally splits a partition into more and more parts; one that incrementally merges a partition into less and less parts.
GLOSSARY: The partition classes maintain a partition of N integers 0..N-1 (aka "elements") into disjoint equivalence classes (aka "parts").
SAFETY: Like vector<int> crashes when used improperly, these classes are not "safe": most of their methods may crash if called with invalid arguments. The client code is responsible for using this class properly. A few DCHECKs() will help catch bugs, though.
[[["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."],[[["The `dynamic_partition` classes manage a partition of integers into disjoint equivalence classes, offering functionality for splitting and merging these classes."],["Two primary dynamic partition classes are available: `DynamicPartition` for incremental splitting and `MergingPartition` for incremental merging."],["These classes are not inherently \"safe\" and may crash if used improperly, requiring client code to ensure proper usage."],["The documentation for specific dynamic partition classes, including `DynamicPartition`, `MergingPartition`, and `SimpleDynamicPartition`, is linked for further exploration."]]],["The documentation details two C++ dynamic partition classes: `DynamicPartition` and `MergingPartition`. These classes manage the division of N integers (0 to N-1) into disjoint equivalence classes, or \"parts.\" `SimpleDynamicPartition` is also listed. One class incrementally splits a partition into more parts, while the other incrementally merges a partition into fewer parts. The classes are not inherently \"safe\"; client code must ensure proper usage to avoid crashes, although some error-checking mechanisms exist.\n"]]