Added ultility functions and distance measures in c++ for Memorybased CF.