Calculate Ranked Nearest Neighbour Interchange (RNNI) distance.

## Arguments

- x
a tree of class "rankedPhylo"

- y
a tree of class "rankedPhylo"

- normalize
normalize the distance to the maximum distance of diameter

`(n-1)(n-2)/2`

where`n`

is the number of tips/leaves.

## Details

The RNNI distance is the shortest distance between two trees in the RNNI space, which is defined
by rank and NNI moves. This space is defined only for ranked trees. Non-ranked ultrametric
trees can be coerced to ranked trees with `as_ranked`

or `rankedPhylo`

functions.

The distance can be normalized to the maximum possible distance, the diameter of the tree-space.
The diameter is defined as `(n-1)(n-2)/2`

, where `n`

is the number of tips/leaves.

The used algorithm implements the TREEPATH algorithm described in Collienne (2021).