diff --git a/Project.toml b/Project.toml index 90350a00..87d08b74 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "Ripserer" uuid = "aa79e827-bd0b-42a8-9f10-2b302677a641" authors = ["mtsch "] -version = "0.9.0" +version = "0.10.0" [deps] Compat = "34da2185-b29b-5c13-b0c7-acf172513d20" diff --git a/docs/src/api/filtrations.md b/docs/src/api/filtrations.md index 6714440c..b34680a8 100644 --- a/docs/src/api/filtrations.md +++ b/docs/src/api/filtrations.md @@ -1,33 +1,41 @@ -# Filtrations +# Filtration Interface ```@docs -AbstractFiltration +Ripserer.AbstractFiltration ``` ```@docs -n_vertices(::AbstractFiltration) +Ripserer.n_vertices(::Ripserer.AbstractFiltration) ``` ```@docs -edges(::AbstractFiltration) +Ripserer.edges(::Ripserer.AbstractFiltration) ``` ```@docs -diam(::AbstractFiltration, ::Any) +Ripserer.diam(::Ripserer.AbstractFiltration, ::Any) ``` ```@docs -diam(::AbstractFiltration, ::AbstractSimplex, ::Any, ::Any) +Ripserer.diam(::Ripserer.AbstractFiltration, ::Ripserer.AbstractSimplex, ::Any, ::Any) ``` ```@docs -birth(::AbstractFiltration, ::Any) +Ripserer.birth(::Ripserer.AbstractFiltration, ::Any) ``` ```@docs -threshold(::AbstractFiltration) +Ripserer.threshold(::Ripserer.AbstractFiltration) ``` ```@docs -AbstractFlagFiltration +Ripserer.simplex_type +``` + +```@docs +Ripserer.AbstractRipsFiltration +``` + +```@docs +Ripserer.dist ``` diff --git a/docs/src/api/ripserer.md b/docs/src/api/ripserer.md index 96e5f509..dcc46c4a 100644 --- a/docs/src/api/ripserer.md +++ b/docs/src/api/ripserer.md @@ -1,4 +1,6 @@ -# Ripserer +# Public API + +## Ripserer ```@docs ripserer @@ -15,3 +17,59 @@ SparseRips ```@docs Cubical ``` + +```@docs +Mod +``` + +## Simplices + +```@docs +Simplex +``` + +```@docs +Cubelet +``` + +```@docs +vertices +``` + +```@docs +dim +``` + +## Persistence Diagrams + +See also: [PersistenceDiagrams.jl +API](https://mtsch.github.io/PersistenceDiagrams.jl/dev/api/diagrams/). Ripserer reexports +the following: + +``` +PersistenceDiagrams.birth +``` + +``` +PersistenceDiagrams.death +``` + +``` +PersistenceDiagrams.persistence +``` + +``` +PersistenceDiagrams.representative +``` + +``` +PersistenceDiagrams.birth_simplex +``` + +``` +PersistenceDiagrams.death_simplex +``` + +``` +PersistenceDiagrams.barcode +``` diff --git a/docs/src/api/simplices.md b/docs/src/api/simplices.md index a70048b1..8510e2d1 100644 --- a/docs/src/api/simplices.md +++ b/docs/src/api/simplices.md @@ -1,57 +1,49 @@ -# Simplices +# Simplex Interface ```@docs -AbstractSimplex +Ripserer.AbstractSimplex ``` ```@docs -dim(::AbstractSimplex) +dim(::Ripserer.AbstractSimplex) ``` ```@docs -diam(::AbstractSimplex) +diam(::Ripserer.AbstractSimplex) ``` ```@docs -Base.sign(::AbstractSimplex) +Base.sign(::Ripserer.AbstractSimplex) ``` ```@docs -Base.:-(::AbstractSimplex) +Base.:-(::Ripserer.AbstractSimplex) ``` ```@docs -coface_type(::AbstractSimplex) +Ripserer.coface_type(::Ripserer.AbstractSimplex) ``` ```@docs -face_type(::AbstractSimplex) +Ripserer.face_type(::Ripserer.AbstractSimplex) ``` ```@docs -vertices(::AbstractSimplex) +vertices(::Ripserer.AbstractSimplex) ``` ```@docs -coboundary(::Any, ::AbstractSimplex) +Ripserer.coboundary(::Any, ::Ripserer.AbstractSimplex) ``` ```@docs -boundary(::Any, ::AbstractSimplex) +Ripserer.boundary(::Any, ::Ripserer.AbstractSimplex) ``` ```@docs -IndexedSimplex +Ripserer.IndexedSimplex ``` ```@docs -index(::AbstractSimplex) -``` - -```@docs -Simplex -``` - -```@docs -Cubelet +Ripserer.index(::Ripserer.AbstractSimplex) ``` diff --git a/docs/src/index.md b/docs/src/index.md index acc346cb..2e4bafe0 100644 --- a/docs/src/index.md +++ b/docs/src/index.md @@ -66,11 +66,10 @@ benchmarking on my computer or a CI system to be too unreliable. ## Extending -Ripserer is designed to be easily extended with new simplex or filtration types. The -interfaces are specified in the docstrings for `AbstractSimplex` and -`AbstractFiltration`. Also see the [Filtrations](@ref) and [Simplices](@ref) API sections -for more info. To see an example of an extension, check out the implementation of cubical -simplices and filtrations in +Ripserer is designed to be easily extended with new simplex or filtration types. See the +[Filtration Interface](@ref) and [Simplex Interface](@ref) API sections for more info. To +see an example of an extension, check out the implementation of cubical simplices and +filtrations in [`src/cubical.jl`](https://github.com/mtsch/Ripserer.jl/blob/master/src/cubical.j). If you have written an extension or have trouble implementing one, please open a pull diff --git a/src/Ripserer.jl b/src/Ripserer.jl index e422fd8f..c22bbbd8 100644 --- a/src/Ripserer.jl +++ b/src/Ripserer.jl @@ -26,18 +26,12 @@ using TupleTools # reexporting basics these makes Ripserer usable without having to import another package. import PersistenceDiagrams: birth, threshold export - PersistenceDiagram, PersistenceInterval, RepresentativeInterval, birth, death, persistence, representative, birth_simplex, death_simplex, barcode export - Mod, - AbstractSimplex, diam, coface_type, face_type, vertices, coboundary, boundary, dim, - IndexedSimplex, index, Simplex, - AbstractFiltration, n_vertices, edges, threshold, - AbstractFlagFiltration, Rips, SparseRips, - Cubelet, Cubical, - simplex, coefficient, - ripserer + Mod, Simplex, Cubelet, vertices, diam, dim, threshold, simplex, coefficient, + Rips, SparseRips, Cubical, ripserer + include("primefield.jl") diff --git a/src/abstractfiltration.jl b/src/abstractfiltration.jl index d4e43df3..7e4087da 100644 --- a/src/abstractfiltration.jl +++ b/src/abstractfiltration.jl @@ -4,16 +4,15 @@ A filtration is used to find the edges in filtration and to determine diameters of simplices. -`T` is the distance type, accessible by `dist_type` and S is the edge type, accesible by -`vertex_type`. +`T` is the distance type, accessible by `dist_type` and `S` is the simplex type. # Interface * [`n_vertices(::AbstractFiltration)`](@ref) * [`edges(::AbstractFiltration)`](@ref) * [`diam(::AbstractFiltration, vertices)`](@ref) -* [`diam(::AbstractFiltration, ::AbstractSimplex, ::Any, ::Any)`](@ref) - only used for - `Simplex`. +* [`diam(::AbstractFiltration, ::AbstractSimplex, ::Any, ::Any)`](@ref) - only used when + [`simplex_type`](@ref) is an [`IndexedSimplex`](@ref). * [`birth(::AbstractFiltration, v)`](@ref) - optional, defaults to returning `zero(T)`. * [`threshold(::AbstractFiltration)`](@ref) - optional, defaults to returning `missing`. * [`simplex_type(::AbstractFiltration, dim)`](@ref) @@ -25,9 +24,9 @@ function Base.show(io::IO, flt::AbstractFiltration) end """ - simplex_type(::AbstractFiltration, dim) + simplex_type(::AbstractFiltration, d) -Return the `dim`-dimensional simplex in the filtration. +Return the `d`-dimensional simplex type in the filtration. """ simplex_type(::AbstractFiltration, dim) @@ -46,30 +45,32 @@ n_vertices(::AbstractFiltration) edges(filtration::AbstractFiltration) Get edges in distance matrix in `filtration`, sorted by decresing length and increasing -combinatorial index. Edges should be of type `edge_type(filtration)`. +combinatorial index. Edges should be of type [`simplex_type`](@ref)(filtration, 1)`. """ edges(::AbstractFiltration) """ - diam(flt::AbstractFiltration, vertices) + diam(::AbstractFiltration, vertices) -Get the diameter of list of vertices i.e. diameter of simplex with `vertices`. Retrun -`missing` if `vertices` do not form a valid simplex. +Get the diameter of a simplex with the vertex set `vertices`. Should return `missing` if +`vertices` do not form a valid simplex. """ diam(::AbstractFiltration, ::Any) """ - diam(flt::AbstractFiltration, simplex, vertices, vertex) + diam(::AbstractFiltration, simplex, vertices, new_vertex) -Get the diameter of coface of a `Simplex` that is formed by adding `vertex` to `vertices`. -Return `missing` if new simplex is not valid. +Get the diameter of coface of a `Simplex` that is formed by adding `new_vertex` to +`vertices`. Should return `missing` if new simplex is not valid. + +This functions is used with the [`coboundary`](@ref) function for [`IndexedSimplex`](@ref) """ diam(::AbstractFiltration, ::AbstractSimplex, ::Any, ::Any) """ birth(::AbstractFiltration, v) -Get the birth time of vertex `v`. +Get the birth time of vertex `v` in filtration. Defaults to 0. """ birth(::AbstractFiltration{T}, _) where T = zero(T) diff --git a/src/abstractsimplex.jl b/src/abstractsimplex.jl index a1349195..047203a0 100644 --- a/src/abstractsimplex.jl +++ b/src/abstractsimplex.jl @@ -10,7 +10,7 @@ actually needed for the main algorithm. # Interface -* `AbstractSimplex{D}(::NTuple{D+1, <:Integer}, ::T)` +* `AbstractSimplex{D}(::SVector{<:Any, <:Integer}, ::T)` * [`diam(::AbstractSimplex)`](@ref) * [`Base.sign(::AbstractSimplex)`](@ref) * [`Base.:-(::AbstractSimplex)`](@ref) @@ -64,7 +64,7 @@ Reverse the simplex orientation. # output 2-dim Simplex(1, 1): - -(3, 2, 1) + -[3, 2, 1] ``` """ Base.:-(::AbstractSimplex) @@ -132,7 +132,6 @@ dim(sx::AbstractSimplex) = dim(typeof(sx)) Base.abs(sx::AbstractSimplex) = sign(sx) == 1 ? sx : -sx - """ vertices(simplex::AbstractSimplex{dim}) @@ -144,22 +143,25 @@ vertices(Simplex{2}((3, 2, 1), 3.2)) # output -(3, 2, 1) +3-element StaticArrays.SArray{Tuple{3},Int64,1,3} with indices SOneTo(3): + 3 + 2 + 1 + ``` """ vertices(::AbstractSimplex) - """ coboundary(filtration, simplex[, Val{all_cofaces}]) Iterate over the coboundary of `simplex`. Use the `filtration` to determine the diameters -and validity of cofaces. Iterates values of the type `coface_type(simplex)`. If +and validity of cofaces. Iterates values of the type [`coface_type`](@ref)`(simplex)`. If `all_cofaces` is `false`, only return cofaces with vertices added to the beginning of vertex list. ```jldoctest coboundary -filtration = RipsFiltration([0 1 1 1; 1 0 1 1; 1 1 0 1; 1 1 1 0]) +filtration = Rips([0 1 1 1; 1 0 1 1; 1 1 0 1; 1 1 1 0]) for c in coboundary(filtration, Simplex{1}(2, 1)) println(c) @@ -167,8 +169,8 @@ end # output -Simplex{2}(+(4, 3, 1), 1) -Simplex{2}(-(3, 2, 1), 1) +Simplex{2}(+[4, 3, 1], 1) +Simplex{2}(-[3, 2, 1], 1) ``` ```jldoctest coboundary @@ -178,7 +180,30 @@ end # output -Simplex{2}(+(4, 3, 1), 1) +2-dim Simplex(1, 1): + +[4, 3, 1] ``` """ coboundary(::Any, ::AbstractSimplex) + +""" + boundary(filtration, simplex[, Val{all_cofaces}]) + +Iterate over the boundary of `simplex`. Use the `filtration` to determine the diameters +and validity of cofaces. Iterates values of the type [`face_type`](@ref)`(simplex)`. + +```jldoctest boundary +filtration = Rips([0 1 1 1; 1 0 1 1; 1 1 0 1; 1 1 1 0]) + +for f in boundary(filtration, Simplex{2}(2, 1)) + println(f) +end + +# output + +Simplex{2}(+[2, 1], 1) +Simplex{2}(-[4, 1], 1) +Simplex{2}(+[4, 2], 1) +``` +""" +boundary(::Any, ::AbstractSimplex) diff --git a/src/main.jl b/src/main.jl index 92ca6849..53a8a13e 100644 --- a/src/main.jl +++ b/src/main.jl @@ -38,20 +38,21 @@ end """ ripserer(dists::AbstractMatrix; kwargs...) - ripserer(points; metric=Euclidean(), births, kwargs...) + ripserer(points; metric=Distances.Euclidean(), births, kwargs...) ripserer(filtration::AbstractFiltration; kwargs...) Compute the persistent homology of metric space represented by `dists`, `points` and -`metric` or an `::AbstractFiltration`. +`metric` or a [`Ripserer.AbstractFiltration`](@ref). -If using points, `points` must be an array of bitstypes, such as `NTuple`s or `SVectors`. +If using points, `points` must be an array of bitstypes, such as `NTuple`s or `SVector`s. # Keyoword Arguments * `dim_max`: compute persistent homology up to this dimension. Defaults to `1`. * `modulus`: compute persistent homology with coefficients in the prime field of integers mod `modulus`. Defaults to `2`. -* `field_type`: use this type of field of coefficients. Defaults to `Mod{modulus}`. +* `field_type`: use this type of field of coefficients. Defaults to + [`Ripserer.Mod`](@ref)`{modulus}`. * `threshold`: compute persistent homology up to diameter smaller than threshold. For non-sparse Rips filtrations, it defaults to radius of input space. * `cutoff`: only keep intervals with `persistence(interval) > cutoff`. Defaults to `0`. @@ -60,9 +61,11 @@ If using points, `points` must be an array of bitstypes, such as `NTuple`s or `S * `progress`: If `true`, show a progress bar. Defaults to `false`. * `metric`: when calculating persistent homology from points, any metric from [`Distances.jl`](https://github.com/JuliaStats/Distances.jl) can be used. Defaults to - `Euclidean()`. -* `births`: when calculating persistent homology from points, births can be used to add - birth times to vertices. Defaults to all births equal to `0`. + `Distances.Euclidean()`. +* `cohomology`: if set to `false`, compute persistent homology instead of cohomology. This + is much slower and gives the same result, but may give more informative representatives + when `reps` is set to `true`. Currently unable to compute infinite intervals in dimensions + higher than 0. Defaults to `false`. """ function ripserer( dists::AbstractMatrix; @@ -92,9 +95,8 @@ function ripserer( ) end -function ripserer(points; metric=Euclidean(), births=nothing, kwargs...) - dists = distances(metric, points, births) - return ripserer(dists; kwargs...) +function ripserer(points::AbstractVector; metric=Euclidean(), threshold=nothing, kwargs...) + return ripserer(Rips(points; metric=metric, threshold=threshold); kwargs...) end function ripserer( diff --git a/src/ripsfiltration.jl b/src/ripsfiltration.jl index 0d562cc5..53295b6d 100644 --- a/src/ripsfiltration.jl +++ b/src/ripsfiltration.jl @@ -39,29 +39,26 @@ end Return distance matrix calculated from `points` with `metric`. If given, add birth times from `births` to the diagonal. """ -function distances(metric, points, births=nothing) +function distances(metric, points) + isempty(points) && throw(ArgumentError("`points` must be nonempty")) + dim = length(first(points)) T = eltype(first(points)) dists = pairwise(metric, reshape(reinterpret(T, points), (dim, length(points))), dims=2) - if !isnothing(births) - for i in 1:length(points) - dists[i, i] = births[i] - end - end return dists end -# flag filtration ======================================================================== # +# rips filtrations ======================================================================= # """ - AbstractFlagFiltration{T, S} <: AbstractFiltration{T, S} + AbstractRipsFiltration{T, S} <: AbstractFiltration{T, S} -An abstract flag filtration is a filtration of flag complexes. Its subtypes can overload -`dist(::AbstractFlagFiltration{T}, u, v)::Union{T, Missing}` instead of `diam`. -`diam(::AbstractFlagFiltration, ...)` defaults to maximum `dist` among vertices. +An abstract Vietoris-Rips filtration. Its subtypes can overload +`dist(::AbstractRipsFiltration{T}, u, v)::Union{T, Missing}` instead of `diam`. +`diam(::AbstractRipsFiltration, ...)` defaults to maximum `dist` among vertices. """ -abstract type AbstractFlagFiltration{T, S} <: AbstractFiltration{T, S} end +abstract type AbstractRipsFiltration{T, S} <: AbstractFiltration{T, S} end -@propagate_inbounds function diam(flt::AbstractFlagFiltration, vertices) +@propagate_inbounds function diam(flt::AbstractRipsFiltration, vertices) n = length(vertices) res = typemin(dist_type(flt)) for i in 1:n, j in i+1:n @@ -72,7 +69,7 @@ abstract type AbstractFlagFiltration{T, S} <: AbstractFiltration{T, S} end return ifelse(res > threshold(flt), missing, res) end -@propagate_inbounds function diam(flt::AbstractFlagFiltration, sx::AbstractSimplex, us, v) +@propagate_inbounds function diam(flt::AbstractRipsFiltration, sx::AbstractSimplex, us, v) res = diam(sx) for u in us # Even though this looks like a tight loop, v changes way more often than us, so @@ -87,15 +84,15 @@ end return res end -edges(flt::AbstractFlagFiltration) = edges(flt.dist, threshold(flt), edge_type(flt)) +edges(flt::AbstractRipsFiltration) = edges(flt.dist, threshold(flt), edge_type(flt)) """ - dist(::AbstractFlagFiltration, u, v) + dist(::AbstractRipsFiltration, u, v) Return the distance between vertices `u` and `v`. If the distance is higher than the threshold, return `missing` instead. """ -dist(::AbstractFlagFiltration, ::Any, ::Any) +dist(::AbstractRipsFiltration, ::Any, ::Any) # rips filtration ======================================================================== # """ @@ -110,35 +107,37 @@ function default_rips_threshold(dists::AbstractMatrix{T}) where T end """ - Rips{I, T} <: AbstractFlagFiltration{T, Simplex} + Rips{I, T} <: AbstractRipsFiltration{T, Simplex} This type represents a filtration of Vietoris-Rips complexes. Diagonal items are treated as vertex birth times. -# Constructor +# Constructors - Rips( - distance_matrix; - threshold=default_rips_threshold(dist), - vertex_type=Simplex{0, T, Int64}, - ) +* `Rips(distance_matrix; threshold=default_rips_threshold(dist))` +* `Rips(points; metric=Euclidean(), threshold=default_rips_threshold(dist))` +* `Rips{I}(args...)`: `I` sets the size of integer used to represent simplices. """ -struct Rips{I, T, A<:AbstractMatrix{T}} <: AbstractFlagFiltration{T, Simplex} +struct Rips{I<:Integer, T, A<:AbstractMatrix{T}} <: AbstractRipsFiltration{T, Simplex} dist::A threshold::T end function Rips{I}( - dist::AbstractMatrix{T}; threshold=default_rips_threshold(dist) + dist::AbstractMatrix{T}; threshold=nothing ) where {I, T} issymmetric(dist) || throw(ArgumentError("`dist` must be a distance matrix")) !issparse(dist) || throw(ArgumentError("`dist` is sparse. Use `SparseRips` instead")) - return Rips{I, T, typeof(dist)}(dist, T(threshold)) + thresh = isnothing(threshold) ? default_rips_threshold(dist) : T(threshold) + return Rips{I, T, typeof(dist)}(dist, thresh) +end +function Rips{I}(points::AbstractVector; metric=Euclidean(), kwargs...) where I + return Rips(distances(metric, points); kwargs...) end -function Rips(dist; threshold=default_rips_threshold(dist)) - return Rips{Int}(dist; threshold=threshold) +function Rips(dist; kwargs...) + return Rips{Int}(dist; kwargs...) end @propagate_inbounds function dist(rips::Rips{<:Any, T}, i, j) where T @@ -152,7 +151,7 @@ simplex_type(rips::Rips{I, T}, dim) where {I, T} = Simplex{dim, T, I} # sparse rips filtration ================================================================= # """ - SparseRips{I, T} <: AbstractFlagFiltration{T, Simplex} + SparseRips{I, T} <: AbstractRipsFiltration{T, Simplex} This type represents a filtration of Vietoris-Rips complexes. The distance matrix will be converted to a sparse matrix with all values greater than @@ -161,12 +160,11 @@ are treated as vertex birth times. # Constructor - SparseRips{I}( - distance_matrix; - threshold=nothing, - ) +* `SparseRips{I}(distance_matrix; threshold=nothing)` +* `SparseRips(distance_matrix; threshold=nothing)`: `I` sets the integer size used to + represent simplices. """ -struct SparseRips{I, T, A<:AbstractSparseMatrix{T}} <: AbstractFlagFiltration{T, Simplex} +struct SparseRips{I, T, A<:AbstractSparseMatrix{T}} <: AbstractRipsFiltration{T, Simplex} dist::A threshold::T end @@ -177,7 +175,7 @@ function SparseRips{I}( issymmetric(dist) || throw(ArgumentError("`dist` must be a distance matrix")) if isnothing(threshold) thresh = maximum(dist) - dists = dist + dists = sparse(dist) else thresh = threshold dists = SparseArrays.fkeep!(copy(dist), (_, _, v) -> v ≤ threshold) @@ -196,7 +194,6 @@ end return ifelse(i == j, zero(T), ifelse(iszero(res), missing, res)) end -# Threshold was handled by deleting entries in the matrix. n_vertices(rips::SparseRips) = size(rips.dist, 1) threshold(rips::SparseRips) = rips.threshold birth(rips::SparseRips, i) = rips.dist[i, i] diff --git a/test/cubical.jl b/test/cubical.jl index fe6144a8..7e75e97e 100644 --- a/test/cubical.jl +++ b/test/cubical.jl @@ -3,7 +3,8 @@ using Ripserer using Compat using StaticArrays -using Ripserer: all_equal_in_dim +using Ripserer: all_equal_in_dim, boundary, coboundary, face_type, coface_type, + edges, n_vertices, index data1d = cos.(range(0, 4π, length=1000)) diff --git a/test/plotting.jl b/test/plotting.jl index b7450eb9..48be63f0 100644 --- a/test/plotting.jl +++ b/test/plotting.jl @@ -1,6 +1,7 @@ using Ripserer using Ripserer: plottable, ChainElement +using PersistenceDiagrams using RecipesBase using RecipesBase: apply_recipe diff --git a/test/reductionmatrix.jl b/test/reductionmatrix.jl index c935354f..64a51cac 100644 --- a/test/reductionmatrix.jl +++ b/test/reductionmatrix.jl @@ -2,7 +2,7 @@ using Ripserer using Random -using Ripserer: chain_element_type, coefficient +using Ripserer: chain_element_type, coefficient, coface_type, face_type, index using Ripserer: ReducedMatrix, record!, commit!, discard! using Ripserer: WorkingBoundary, nonheap_push!, get_pivot!, repair! diff --git a/test/ripserer.jl b/test/ripserer.jl index f7133a9d..a8041419 100644 --- a/test/ripserer.jl +++ b/test/ripserer.jl @@ -1,5 +1,6 @@ using Ripserer using Ripserer: zeroth_intervals, ChainElement, PackedElement +using PersistenceDiagrams using Compat using StaticArrays diff --git a/test/ripsfiltration.jl b/test/ripsfiltration.jl index 7ae195bd..14545548 100644 --- a/test/ripsfiltration.jl +++ b/test/ripsfiltration.jl @@ -1,5 +1,5 @@ using Ripserer -using Ripserer: distances, dist_type, vertex_type, edge_type, dist, threshold +using Ripserer: distances, dist_type, vertex_type, edge_type, dist, edges, n_vertices using ..TestHelpers: test_filtration_interface include("data.jl") diff --git a/test/simplex.jl b/test/simplex.jl index 4ae1cad5..727df416 100644 --- a/test/simplex.jl +++ b/test/simplex.jl @@ -1,7 +1,7 @@ using Ripserer using StaticArrays -using Ripserer: small_binomial +using Ripserer: small_binomial, boundary, coboundary, face_type, coface_type, index using ..TestHelpers: test_indexed_simplex_interface struct FakeFiltration end diff --git a/test/test_helpers.jl b/test/test_helpers.jl index bc8c9e8d..aba1a390 100644 --- a/test/test_helpers.jl +++ b/test/test_helpers.jl @@ -2,7 +2,8 @@ module TestHelpers using Test using Ripserer -using Ripserer: dist_type, vertex_type, edge_type +using Ripserer: dist_type, vertex_type, edges, edge_type, + AbstractSimplex, IndexedSimplex, face_type, coface_type, index """ test_indexed_simplex_interface(S, n_vertices)