This package has extensible C++ code for computing dissimilarities between vectors. It also has a number of C++ functions for assembling collections of dissimilarities. In particular, it lets you find a matrix of dissimilarities between the rows of two input matrices. There are also functions for finding the nearest neighbors of each row of a matrix, either within the matrix itself or within another matrix.
an R package that can perform a variety of distance/dissimilarity operations between matrices or the rows of a matrix. It includes a C++ framework for creating and including new dissimilarity measures.