Implementation of Neighborhood Component Analysis in Matlab and C++