Stay organized with collections
Save and categorize content based on your preferences.
C++ Reference: class TopNCuts
Note: This documentation is automatically generated.
Before adding cuts to the global pool, it is a classical thing to only keep
the top n of a given type during one generation round. This is there to help
doing that.
TODO(user): Avoid computing efficacity twice.
TODO(user): We don't use any orthogonality consideration here.
TODO(user): Detect duplicate cuts?
[[["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\u003eTopNCuts\u003c/code\u003e class in C++ helps to keep only the top N cuts of a given type during a generation round, improving efficiency.\u003c/p\u003e\n"],["\u003cp\u003eThis class provides functionalities to add a cut, store a specified number of top cuts, and transfer these cuts to a LinearConstraintManager.\u003c/p\u003e\n"],["\u003cp\u003eThere are potential areas for improvement like avoiding duplicate efficacy computation, incorporating orthogonality considerations, and detecting duplicate cuts.\u003c/p\u003e\n"]]],["The `TopNCuts` class in C++ manages a local pool of cuts, keeping only the top *n* cuts of a specific type during each generation round before adding them to a global pool. Key actions include using the `AddCut` method to add a cut with a name and LP solution to the local pool. `TransferToManager` empties the local pool, transferring its contents to a designated manager. The class constructor, `TopNCuts`, takes an integer *n* to specify the maximum number of cuts to retain.\n"],null,["# TopNCuts\n\nC++ Reference: class TopNCuts\n=============================\n\n\nNote: This documentation is automatically generated.\nBefore adding cuts to the global pool, it is a classical thing to only keep the top n of a given type during one generation round. This is there to help doing that. \n\nTODO(user): Avoid computing efficacity twice. TODO(user): We don't use any orthogonality consideration here. TODO(user): Detect duplicate cuts?\n\n| Method ||\n|------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [`AddCut`](https://github.com/google/or-tools/blob/v9.4/ortools/sat/linear_constraint_manager.h#L306) | Return type: `void ` Arguments: `LinearConstraint ct, const std::string& name, const absl::StrongVector\u003cIntegerVariable, double\u003e& lp_solution` Add a cut to the local pool |\n| [`TopNCuts`](https://github.com/google/or-tools/blob/v9.4/ortools/sat/linear_constraint_manager.h#L303) | Return type: `explicit ` Arguments: `int n` \u003cbr /\u003e |\n| [`TransferToManager`](https://github.com/google/or-tools/blob/v9.4/ortools/sat/linear_constraint_manager.h#L310) | Return type: `void ` Arguments: ` const absl::StrongVector\u003cIntegerVariable, double\u003e& lp_solution, LinearConstraintManager* manager` Empty the local pool and add all its content to the manager. |"]]