Ripser / ripser

Ripser: efficient computation of Vietoris–Rips persistence barcodes
http://ripser.org
MIT License
311 stars 78 forks source link
computational-topology persistent-homology topological-data-analysis

Ripser

Copyright © 2015–2021 Ulrich Bauer.

Description

Ripser is a lean C++ code for the computation of Vietoris–Rips persistence barcodes. It can do just this one thing, but does it extremely well.

To see a live demo of Ripser's capabilities, go to live.ripser.org. The computation happens inside the browser (using Emscripten to compile Ripser to WebAssembly, supported on recent browsers).

The main features of Ripser:

Currently, Ripser outperforms other codes (Dionysus, DIPHA, GUDHI, Perseus, PHAT) by a factor of more than 40 in computation time and a factor of more than 15 in memory efficiency (for the example linked at live.ripser.org). (Note that PHAT does not contain code for generating Vietoris–Rips filtrations).

Input formats currently supported by Ripser:

Ripser's efficiency is based on a few important concepts and principles, building on key previous and concurrent developments by other researchers in computational topology:

Version

Building

Ripser requires a C++11 compiler. Here is how to obtain, build, and run Ripser:

git clone https://github.com/Ripser/ripser.git
cd ripser
make
./ripser examples/sphere_3_192.lower_distance_matrix

Options

Ripser supports several compile-time options. They are switched on by defining the C preprocessor macros listed below, either using #define in the code or by passing an argument to the compiler. The following options are supported:

For example, to build Ripser with support for Martin Ankerl's robin hood hashmap:

$ c++ -std=c++11 ripser.cpp -o ripser -O3 -D NDEBUG -D USE_ROBINHOOD_HASHMAP

A Makefile is provided with some variants of the above options. Use make all to build them. The default make builds a binary with the default options.

The input is given either in a file whose name is passed as an argument, or through stdin. The following options are supported at the command line:

Experimental features

The following experimental features are currently available in separate branches:

Citing

If you use Ripser in your research or if you want to give a reference to Ripser in a paper, you may use the following bibtex entry (will be updated with complete publication data):

@article{Bauer2021Ripser,
    AUTHOR = {Bauer, Ulrich},
     TITLE = {Ripser: efficient computation of {V}ietoris-{R}ips persistence
              barcodes},
   JOURNAL = {J. Appl. Comput. Topol.},
  FJOURNAL = {Journal of Applied and Computational Topology},
    VOLUME = {5},
      YEAR = {2021},
    NUMBER = {3},
     PAGES = {391--423},
      ISSN = {2367-1726},
   MRCLASS = {55N31 (55-04)},
  MRNUMBER = {4298669},
       DOI = {10.1007/s41468-021-00071-5},
       URL = {https://doi.org/10.1007/s41468-021-00071-5},
}

License

Ripser is licensed under the MIT license (COPYING.txt), with an extra clause (CONTRIBUTING.txt) clarifying the license for modifications released without an explicit written license agreement. Please contact the author if you want to use Ripser in your software under a different license.