Stay organized with collections
Save and categorize content based on your preferences.
C++ Reference: class ConstraintGraphNeighborhoodGenerator
Note: This documentation is automatically generated.
Pick a random subset of constraint and relax all of their variables. We are a
bit smarter than this because after the first constraint is selected, we only
select constraints that share at least one variable with the already selected
constraints. The variable from the "last" constraint are selected randomly.
Method |
ConstraintGraphNeighborhoodGenerator | Return type: explicit Arguments:
NeighborhoodGeneratorHelper const* helper, const std::string& name |
Generate | Return type: Neighborhood Arguments: const CpSolverResponse& initial_solution,
double difficulty, absl::BitGenRef random |
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-08-06 UTC.
[null,null,["Last updated 2024-08-06 UTC."],[],["The `ConstraintGraphNeighborhoodGenerator` class in C++ selects a subset of constraints and relaxes their variables. The selection process prioritizes constraints that share at least one variable with previously selected constraints. Variables from the most recently added constraint are randomly picked. The `Generate` method, taking an initial solution, difficulty level, and a random number generator as arguments, produces a new neighborhood. The class also have a constructor.\n"],null,[]]