Nearest-Neighbor-Interchange (NNI)

The Nearest-Neighbor-Interchange is a heuristic to improve the likelihood of a tree by performing the following operation on it. If we have two unrooted trees then we can specify a neighbor relation between the two of them, and then swap their subtrees in an attempt to get a tree which has a higher likelihood.