Stay organized with collections
Save and categorize content based on your preferences.
C++ Reference: class SimpleDynamicPartition
Note: This documentation is automatically generated.
A subset of the API of DynamicPartition without backtrack support. The
Refine() here is about twice as fast, but we have limited query support until
a batch ComputeElementsByPart() is called.
[[["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\u003eSimpleDynamicPartition\u003c/code\u003e is a subset of the \u003ccode\u003eDynamicPartition\u003c/code\u003e class in OR-Tools, designed for faster refinement without backtracking support.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eRefine\u003c/code\u003e method is approximately twice as fast as in \u003ccode\u003eDynamicPartition\u003c/code\u003e, but query support is limited until \u003ccode\u003eComputeElementsByPart\u003c/code\u003e is called.\u003c/p\u003e\n"],["\u003cp\u003eIt provides methods like \u003ccode\u003eNumElements\u003c/code\u003e, \u003ccode\u003eNumParts\u003c/code\u003e, \u003ccode\u003ePartOf\u003c/code\u003e, and \u003ccode\u003eSizeOfPart\u003c/code\u003e to manage and query the elements and partitions.\u003c/p\u003e\n"],["\u003cp\u003eThis class is particularly useful when backtracking is not necessary and faster refinement is desired.\u003c/p\u003e\n"]]],["`SimpleDynamicPartition` is a C++ class, a faster subset of `DynamicPartition` without backtrack. It initializes with a number of elements. Key actions include `Refine`, which accepts a subset to refine partitions. Methods `NumElements` and `NumParts` return the total number of elements and partitions, respectively. `PartOf` identifies the partition for a given element, and `SizeOfPart` returns the size of a specified partition. Limited query support is provided.\n"],null,["# SimpleDynamicPartition\n\nC++ Reference: class SimpleDynamicPartition\n===========================================\n\n\nNote: This documentation is automatically generated.\nA subset of the API of DynamicPartition without backtrack support. The Refine() here is about twice as fast, but we have limited query support until a batch ComputeElementsByPart() is called.\n\n| Method ||\n|----------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------|\n| [`NumElements`](https://github.com/google/or-tools/blob/v9.4/ortools/algorithms/dynamic_partition.h#L285) | Return type: `int ` \u003cbr /\u003e |\n| [`NumParts`](https://github.com/google/or-tools/blob/v9.4/ortools/algorithms/dynamic_partition.h#L286) | Return type: `const int ` \u003cbr /\u003e |\n| [`PartOf`](https://github.com/google/or-tools/blob/v9.4/ortools/algorithms/dynamic_partition.h#L287) | Return type: `int ` Arguments: `int element` \u003cbr /\u003e |\n| [`Refine`](https://github.com/google/or-tools/blob/v9.4/ortools/algorithms/dynamic_partition.h#L290) | Return type: `void ` Arguments: `absl::Span\u003cconst int\u003e distinguished_subset` \u003cbr /\u003e |\n| [`SimpleDynamicPartition`](https://github.com/google/or-tools/blob/v9.4/ortools/algorithms/dynamic_partition.h#L281) | Return type: `explicit ` Arguments: `int num_elements` \u003cbr /\u003e |\n| [`SizeOfPart`](https://github.com/google/or-tools/blob/v9.4/ortools/algorithms/dynamic_partition.h#L288) | Return type: `int ` Arguments: `int part` \u003cbr /\u003e |"]]