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."],[[["\u003cp\u003e\u003ccode\u003eSwapIndexPairOperator\u003c/code\u003e iterates through alternative paths by exploring different combinations of node pairs and their alternatives.\u003c/p\u003e\n"],["\u003cp\u003eIt systematically generates neighboring solutions by swapping node pairs within a given path.\u003c/p\u003e\n"],["\u003cp\u003eThe operator is initialized with index pairs and path variables to define the search space.\u003c/p\u003e\n"],["\u003cp\u003eSeveral methods are available for controlling the iteration process (\u003ccode\u003eMakeNextNeighbor\u003c/code\u003e, \u003ccode\u003eOnStart\u003c/code\u003e) and retrieving debug information (\u003ccode\u003eDebugString\u003c/code\u003e).\u003c/p\u003e\n"]]],["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"],null,[]]