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
[[["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."],[[["`SwapIndexPairOperator` iterates through alternative paths by exploring different combinations of node pairs and their alternatives."],["It systematically generates neighboring solutions by swapping node pairs within a given path."],["The operator is initialized with index pairs and path variables to define the search space."],["Several methods are available for controlling the iteration process (`MakeNextNeighbor`, `OnStart`) and retrieving debug information (`DebugString`)."]]],["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"]]