An open-source C-based library for metric space indexing

This library contains source code implementing several indexing algorithms, as well as metric spaces, conforming to an API that permits adding new indexes and spaces. In addition, there are example instances and automatic generators for different metric spaces.

Download the source codes and manual from here (gzipped tar). This is the main structure of the library.


Download all the database instances provided from here (gzipped tar). Beware of its size! This will expand into a directory dbs/ that should go inside directory metricSpaces/ of the main structure (where the directory already exists).

If you only want some databases, then browse them and download those you really want. Expand them in the correct subdirectory of metricSpaces/dbs/.

New - JAVA version is now available! [here]

Please, use this bibtex to cite the library:


Author = {K.~Figueroa and G.{}~Navarro and E.~Ch\'avez},

Keywords = {Metric Spaces, similarity searching},

Lastchecked = {August 18, 2012},

Note = {Available at {\tt\_Space\_Library.html},

Title = {Metric Spaces Library},

Year = {2007}


The manual is inside the main structure, but you can also download it directly.


Send any question, problem, bug report, and new contribution (which will be especially welcome!) to Karina Figueroa.


The new version is 1.3


The erratas can be seen [here].

Other contributions

Dataset of trees by Arnoldo Muller. Source: [browse it] or [download]. Dataset: [download]. January 2009

[Updated] Patch some warnings of the library about some unused variables by Cristian Greco.

Counting Distance Permutations by Matthew Skala.

FastSS algorithm (for strings) by Thomas Bocek or from the site.

Visual similarity in sign language by Jan Ulrych.

Databases by Mao from Shenzhen University mobios