Stay organized with collections
Save and categorize content based on your preferences.
C++ Reference: class VariableGraphNeighborhoodGenerator
Note: This documentation is automatically generated.
Pick a random subset of variables that are constructed by a BFS in the
variable <-> constraint graph. That is, pick a random variable, then all the
variable connected by some constraint to the first one, and so on. The
variable of the last "level" are selected randomly.
Note that in the presence of connected component, this works correctly
already.
Method |
Generate | Return type: Neighborhood Arguments: const CpSolverResponse& initial_solution,
double difficulty, absl::BitGenRef random |
VariableGraphNeighborhoodGenerator | Return type: explicit Arguments:
NeighborhoodGeneratorHelper const* helper, const std::string& name |
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 `VariableGraphNeighborhoodGenerator` class constructs a random subset of variables via a Breadth-First Search (BFS) in a variable-constraint graph. It selects an initial random variable, then all connected variables, and so forth. Variables from the last BFS level are chosen randomly. The `Generate` method returns a `Neighborhood`, taking the current `CpSolverResponse`, a difficulty parameter, and a random bit generator as arguments. The `VariableGraphNeighborhoodGenerator` method is a constructor, taking a `NeighborhoodGeneratorHelper` and a name.\n"],null,[]]