- Notifications
You must be signed in to change notification settings - Fork0
Simple Ripser wrapper in Julia
License
mtsch/Ripser.jl
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Simple wrapper toRipser in Julia with almost nofeatures and minimal dependencies.
Ripser.jlshould work, but is not maintained. If you are interested in this project, itmight be worth taking a look atRipserer.jl.
This package is unregistered. To install, run it with:
(v1.0) pkg> add https://github.com/mtsch/Ripser.jl#master(v1.0) pkg> test Ripser
ripser(dists; modulus = 2, dim_max = 1, threshold = Inf, cocycles = false)
Run Ripser on a dists, and a square (sparse) matrix ofT<:AbstractFloat
.
dists
: the distance matrix. Matrix can be sparse.dim_max
: compute persistent homology up to this dimension.threshold
: compute Rips complexes up to this diameter.modulus
: compute homology with coefficients in the prime field Z/pZ,wherep is the value given.cocycles
: return representative cocycles.
Returns aVector{Vector{Tuple{T, T}}}
and ifcocycles
is set totrue
, aVector{Vector{Tuple{Vector{Int64},Int64}}}
.
The first part of the result contains a persistence diagram per each dimension (and is oflengthdim_max + 1
). Each persistence diagram is a vector of tuples, where a tuple is thepersistence pair(birth, death)
. A single cocycle is represented as a vector of(simplex, value)
pairs. They are only included if thevalue
is nonzero. Each persistence pair getsa corresponding cocycle.
Note that representative cocycles for the zeroth dimension are not computed.