JavaPermutationTools (JPT) is a Java library for representing and generating permutations and sequences, as well as performing computation on permutations and sequences. This includes implementations of a variety of permutation distance metrics as well as distance metrics on sequences (i.e., Strings, arrays, and other ordered data types).

The JPT source code repository is hosted on GitHub; and is licensed under the GNU General Public License Version 3 (GPLv3). The API documentation is found on this site. The library is regularly published to Maven Central, from which it is easily imported into software projects using Maven and other commonly used build tools.

Additionally, there is a GitHub repository of example programs that show basic usage of the JPT library, as well as replication programs that reproduce results found in published papers.

The JPT library originated as part of the research of Vincent A. Cicirello.

How to Cite

If you use JPT in your research, please cite the following article which describes the library:

Importing from Maven Central

To import JPT from the Maven Central repository (if your build tool is Maven), add the following to the dependencies section of your “pom.xml” (for other build tools, see the tool's documentation for the equivalent):


Just replace the version number with your desired version of the library.

Java Modules

The library provides a Java module, org.cicirello.jpt. To use in your project, add the following to your

module {
    requires org.cicirello.jpt;

This module includes the org.cicirello.permutations and org.cicirello.sequences packages as well as their subpackages. See the API documentation for details.

Beginning with version 3.0.0, randomization and other math utilities, and some generic utilities, have been moved to a pair of new libraries ρμ and org.cicirello.core, which are now dependencies of JavaPermutationTools. Your dependency manager (see previous section) will handle downloading these for you.

To ease the transition of users of the library who may have been relying on those utilities, we have configured the for the org.cicirello.jpt module to require these transitively so that your application should only need to require org.cicirello.jpt to access the functionality of those new modules.

Semantic Versioning

The JPT uses Semantic Versioning with version numbers of the form: MAJOR.MINOR.PATCH, where differences in MAJOR correspond to incompatible API changes, differences in MINOR correspond to introduction of backwards compatible new functionality, and PATCH corresponds to backwards compatible bug fixes.

Development Process

Related Publications

The following papers, most of which are related to fitness landscape analysis, used this API. Programs for replicating the data from these papers can be found in the replication directory. In order to fully understand the data generated by the programs in the replication directory, you may need to consult these papers: