jakipatryk / spark-persistent-homology

(WIP, not fast enough for any production usage yet) Library for persistent homology computations in Apache Spark.
Apache License 2.0
0 stars 0 forks source link

Persistence image generation doesn't work with dim-0 Vietoris-Rips and not specified bounds #10

Closed jakipatryk closed 1 year ago

jakipatryk commented 1 year ago

In dim-0, all complexes in Vietoris-Rips filtration have birth 0. This way, when bounds for dim-0 in persistence image genration are not specified, the image generated is actually 1D, that is not expected and not really user-friendly. User expects an image with resolution specified by numberOfPixelsOnBirthAxisPerDim and numberOfPixelsOnPersistenceAxis.

Proposed solution

Throw user-friendly error whenever, in any dim, bounds are not specified (or are trivial (min=max)) and bounds calculated from points are trivial (min=max). In: https://github.com/jakipatryk/spark-persistent-homology/blob/master/src/main/scala/com/jakipatryk/spark/persistenthomology/persistenceimage/PersistenceImage.scala