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` selects a random subset of variables using a Breadth-First Search (BFS) approach in the variable-constraint graph."],["Variables are chosen iteratively, starting with a random variable, then expanding to include all variables connected by constraints, with the final \"level\" variables selected randomly."],["It functions effectively even when dealing with connected components within the graph."],["This generator can be used to create neighborhoods for local search, aiding in the exploration of the solution space for constraint satisfaction problems."]]],[]]