TwoWayRule
x<->y or xy
represents a two-way rule expressing exchange or correspondence of x and y.
Details
- Two-way rules are very general constructs that can represent exchange, equivalence, correspondence and other bidirectional relations between expressions.
- The character can be entered as ∖[TwoWayRule].
- In StandardForm, TwoWayRule is printed using .
- Transpose[array,nm] transposes levels n and m of the array, without changing other levels.
- TwoWayRule[a,b] is equivalent to UndirectedEdge[a,b] in Graph constructors.
Examples
Basic Examples (2)
Exchange levels 2 and 3 of an array of depth 3 using TwoWayRule to express a permutation:
Input undirected edges in a graph using TwoWayRule:
Wolfram Research (2017), TwoWayRule, Wolfram Language function, https://reference.wolfram.com/language/ref/TwoWayRule.html.
Text
Wolfram Research (2017), TwoWayRule, Wolfram Language function, https://reference.wolfram.com/language/ref/TwoWayRule.html.
CMS
Wolfram Language. 2017. "TwoWayRule." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/TwoWayRule.html.
APA
Wolfram Language. (2017). TwoWayRule. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/TwoWayRule.html