Did I find the right examples for you? yes no

# sympy.combinatorics.permutations.Permutation.get_positional_distance

All Samples(8)  |  Call(8)  |  Derive(0)  |  Import(0)
```Computes the positional distance between two permutations.

Examples
========

>>> from sympy.combinatorics.permutations import Permutation
>>> p = Permutation([0, 3, 1, 2, 4])
>>> q = Permutation.josephus(4, 5, 2)
>>> r = Permutation([3, 1, 4, 0, 2])
>>> p.get_positional_distance(q)(more...)
```

```    assert p.get_precedence_distance(q) == q.get_precedence_distance(p)
assert p.get_positional_distance(q) == p.get_positional_distance(q)
p = Permutation([0, 1, 2, 3])
q = Permutation([3, 2, 1, 0])
assert p.get_precedence_distance(q) == 6
assert p.get_positional_distance(q) == 8
```
```    assert p.get_adjacency_distance(q) == 3
raises(ValueError, lambda: p.get_positional_distance(Permutation([])))
raises(ValueError, lambda: p.get_precedence_distance(Permutation([])))

```

```    assert p.get_precedence_distance(q) == q.get_precedence_distance(p)
assert p.get_positional_distance(q) == p.get_positional_distance(q)
p = Permutation([0, 1, 2, 3])
q = Permutation([3, 2, 1, 0])
assert p.get_precedence_distance(q) == 6
```    assert p.get_adjacency_distance(q) == 3