fixed distance calculation in isomaps