Stay organized with collections
Save and categorize content based on your preferences.
C++ Reference: class SwapIndexPairOperator
Note: This documentation is automatically generated.
Operator which iterates through each alternative of a set of pairs. If a
pair has n and m alternatives, n.m alternatives will be explored.
Possible neighbors for the path 1 -> A -> a -> 2 (where (1, 2) are first and
last nodes of a path and A has B, C as alternatives and a has b as
alternative):
1 -> A -> [b] -> 2
1 -> [B] -> a -> 2
1 -> [B] -> [b] -> 2
1 -> [C] -> a -> 2
1 -> [C] -> [b] -> 2
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 `SwapIndexPairOperator` class iterates through alternatives of pairs, exploring `n.m` alternatives if a pair has `n` and `m` alternatives. It generates potential neighbors for paths by swapping alternatives within the path. The class includes methods like `MakeNextNeighbor` to generate neighbors, `OnStart` for initialization, and `DebugString` for debugging. It takes input `vars`, `path_vars`, `start_empty_path_class`, and `index_pairs` in its constructor.\n"]]