Skip to main content
. Author manuscript; available in PMC: 2015 Aug 6.
Published in final edited form as: J Am Stat Assoc. 2011;106(495):1075–1084. doi: 10.1198/jasa.2011.tm10183
  • Start with Inline graphic = {{x1}, …, {xn}} and d({xi}, {xj}) = d(xi, xj) for all ij.

  • The chain is empty.

  • For l = 1, …, n − 1:

    1. If chain is empty, choose an arbitrary GInline graphic; otherwise, let G be the current end of the chain.

    2. Grow a nearest-neighbor chain from G until an RNN pair (G1, G2) is found.

    3. Update Inline graphic = Inline graphic ∪ {G1G2} \ {G1, G2}.

    4. Calculate d(G1G2, H) for all HInline graphic.

    5. Remove G1 and G2 from the chain.