[[["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\u003eThe \u003ccode\u003eTopN\u003c/code\u003e class is designed to manage and track the top N elements based on their scores.\u003c/p\u003e\n"],["\u003cp\u003eIt provides methods to add elements with scores, clear the current set, and access the unordered elements.\u003c/p\u003e\n"],["\u003cp\u003eInitialization requires specifying the desired number of top elements (N).\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eAdd\u003c/code\u003e method incorporates new elements and their scores, updating the top N accordingly.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eUnorderedElements\u003c/code\u003e method retrieves all the currently stored elements without any specific ordering.\u003c/p\u003e\n"]]],["The `TopN` class in C++ provides methods for managing a collection of elements. `Add` adds an element with an associated score. `Clear` removes all elements. `TopN` is the constructor, initializing the capacity to hold *n* elements. `UnorderedElements` returns a vector containing the current elements, which may be in any order. The class is part of the OR-Tools library and can be found in the `linear_constraint_manager.h` header file.\n"],null,["# TopN\n\nC++ Reference: class TopN\n=========================\n\n\nNote: This documentation is automatically generated.\n\n| Method ||\n|------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------|\n| [`Add`](https://github.com/google/or-tools/blob/v9.4/ortools/sat/linear_constraint_manager.h#L256) | Return type: `void ` Arguments: `Element e, double score` \u003cbr /\u003e |\n| [`Clear`](https://github.com/google/or-tools/blob/v9.4/ortools/sat/linear_constraint_manager.h#L251) | Return type: `void ` \u003cbr /\u003e |\n| [`TopN`](https://github.com/google/or-tools/blob/v9.4/ortools/sat/linear_constraint_manager.h#L249) | Return type: `explicit ` Arguments: `int n` \u003cbr /\u003e |\n| [`UnorderedElements`](https://github.com/google/or-tools/blob/v9.4/ortools/sat/linear_constraint_manager.h#L277) | Return type: `const std::vector\u003cElement\u003e& ` \u003cbr /\u003e |"]]