Add reference and formula in closeness docstring. Addresses #824