implementation and tests of Adjusted Rand coefficient