add distance measurement option for spectural clustering application