https://github.com/mtsch/Ripserer.jl
Flexible and efficient persistent homology computation.
https://github.com/mtsch/Ripserer.jl
cohomology homology julia persistent-homology ripser tda topological-data-analysis topology
Last synced: 8 days ago
JSON representation
Flexible and efficient persistent homology computation.
- Host: GitHub
- URL: https://github.com/mtsch/Ripserer.jl
- Owner: mtsch
- License: mit
- Created: 2020-04-09T06:38:23.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2025-10-23T02:49:02.000Z (8 months ago)
- Last Synced: 2026-05-30T11:04:56.033Z (23 days ago)
- Topics: cohomology, homology, julia, persistent-homology, ripser, tda, topological-data-analysis, topology
- Language: Julia
- Homepage: https://mtsch.github.io/Ripserer.jl/dev/
- Size: 233 MB
- Stars: 80
- Watchers: 4
- Forks: 8
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Citation: CITATION.bib
Awesome Lists containing this project
- awesome-TDA - Ripserer.jl - Flexible and efficient pure-Julia implementation of the Ripser algorithm for computing persistent homology. (Frameworks and Libs / Julia)
README
_Flexible and efficient persistent homology computation._
[](https://coveralls.io/github/mtsch/Ripserer.jl?branch=master)
[](https://github.com/mtsch/Ripserer.jl/actions?query=workflow%3ATest)
[](https://mtsch.github.io/Ripserer.jl/dev)
[](https://joss.theoj.org/papers/0c8b6abead759ba068ee178fedc998a9)
## Introduction
Ripserer is a pure Julia implementation of the [Ripser](https://github.com/Ripser/ripser)
algorithm for computing persistent homology. Its aims are to be easy to use, generic, and
fast.
See the [documentation](https://mtsch.github.io/Ripserer.jl/dev) for more information and
usage examples.
If you're looking for persistence diagram-related functionality such as Wasserstein or
bottleneck distances, persistence images, or persistence curves, please see
[PersistenceDiagrams.jl](https://github.com/mtsch/PersistenceDiagrams.jl).
## Quick start
This package is registered. To install it, run the following.
```julia
julia> using Pkg
julia> Pkg.add("Ripserer")
```
Now, generate some data.
```julia
julia> data = [(rand(), rand(), rand()) for _ in 1:200]
```
The main exported function in this package is
[`ripserer`](https://mtsch.github.io/Ripserer.jl/dev/api/ripserer/#Ripserer.ripserer). By
default, it computes Vietoris-Rips persistent homology on point cloud data and distance
matrices.
```julia
julia> ripserer(data)
# 2-element Vector{PersistenceDiagrams.PersistenceDiagram}:
# 200-element 0-dimensional PersistenceDiagram
# 84-element 1-dimensional PersistenceDiagram
```
[Several other filtration
types](https://mtsch.github.io/Ripserer.jl/dev/api/ripserer/#Filtrations) are supported. We
tell `ripserer` to use them by passing them as the first argument.
```julia
julia> ripserer(EdgeCollapsedRips, data)
# 2-element Vector{PersistenceDiagrams.PersistenceDiagram}:
# 200-element 0-dimensional PersistenceDiagram
# 84-element 1-dimensional PersistenceDiagram
```
Sometimes you may want to initialize a filtration in advance.
```julia
julia> rips = EdgeCollapsedRips(data, threshold=1)
# EdgeCollapsedRips{Int64, Float64}(nv=200)
```
```julia
julia> ripserer(rips, dim_max=2)
# 3-element Vector{PersistenceDiagrams.PersistenceDiagram}:
# 200-element 0-dimensional PersistenceDiagram
# 84-element 1-dimensional PersistenceDiagram
# 16-element 2-dimensional PersistenceDiagram
```
Ripserer supports plotting with
[Plots.jl](https://github.com/JuliaPlots/Plots.jl). Experimental
[Makie.jl](https://github.com/JuliaPlots/Makie.jl) support is also available
[here](https://github.com/mtsch/MakieRipserer.jl).
Plotting persistence diagrams and barcodes is straightforward:
```julia
using Plots
result = ripserer(data, dim_max=2)
plot(plot(result), barcode(result)
```

```julia
barcode(result)
```
