PersistenceBar

org.appliedtopology.tda4j.PersistenceBar
See thePersistenceBar companion class

Utility functions for working with persistence bars.

For any cases not covered by these simplistic factory method, the programmer gets to instantiate their own PersistenceBar object.

Attributes

Companion
class
Experimental
true
Source
Barcode.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Value members

Concrete methods

def apply[FiltrationT : Ordering](dim: Int): PersistenceBar[FiltrationT, Nothing]

If we know nothing, assume the user is asking for $(-\infty,\infty)$.

If we know nothing, assume the user is asking for $(-\infty,\infty)$.

Attributes

Source
Barcode.scala
def apply[FiltrationT : Ordering](dim: Int, lower: FiltrationT): PersistenceBar[FiltrationT, Nothing]

If we only get a lower endpoint, produce the ordinary persistence bar $[\ell, \infty)$.

If we only get a lower endpoint, produce the ordinary persistence bar $[\ell, \infty)$.

Attributes

Source
Barcode.scala
def apply[FiltrationT : Ordering](dim: Int, lower: FiltrationT, upper: FiltrationT): PersistenceBar[FiltrationT, Nothing]

If we get a lower and an upper endpoint, produce the ordinary persistence bar $[\ell, u)$

If we get a lower and an upper endpoint, produce the ordinary persistence bar $[\ell, u)$

Attributes

Source
Barcode.scala
def dropZeroLength[F, A](bars: Iterable[PersistenceBar[F, A]], includeZeroLength: Boolean): List[PersistenceBar[F, A]]

bars without the zero-length ones, unless includeZeroLength: what every engine applies to its output.

bars without the zero-length ones, unless includeZeroLength: what every engine applies to its output.

Attributes

Source
Barcode.scala

Givens

Givens

given barShow: [F, A] => (Show[F], Show[A]) => Show[PersistenceBar[F, A]]

bar.show: the degree, the interval and the representative, 1: [0.5, 1.2) 1 ⊠ ∆(0,1) + ... (each part by its own Show; the representative is left out when the bar has none).

bar.show: the degree, the interval and the representative, 1: [0.5, 1.2) 1 ⊠ ∆(0,1) + ... (each part by its own Show; the representative is left out when the bar has none).

Attributes

Source
Barcode.scala
given unannotatedBarShow: [F : Show] => Show[PersistenceBar[F, Nothing]]

bar.show for a bar with no annotation type (PersistenceBar[Double](1, 0.5, 1.2)): 1: [0.5, 1.2).

bar.show for a bar with no annotation type (PersistenceBar[Double](1, 0.5, 1.2)): 1: [0.5, 1.2).

Attributes

Source
Barcode.scala

Extensions

Extensions

extension [A](bar: PersistenceBar[Double, A])
def birth: Double

Plain numbers for a bar over Double filtration values, so callers need not pattern-match on the endpoint types (open/closed makes no difference to the numbers): birth and death (Infinity for an essential class), persistence = death - birth, and toTriple = (dim, birth, death), the same shape diagramAt returns.

Plain numbers for a bar over Double filtration values, so callers need not pattern-match on the endpoint types (open/closed makes no difference to the numbers): birth and death (Infinity for an essential class), persistence = death - birth, and toTriple = (dim, birth, death), the same shape diagramAt returns.

Attributes

Source
Barcode.scala
def death: Double

Plain numbers for a bar over Double filtration values, so callers need not pattern-match on the endpoint types (open/closed makes no difference to the numbers): birth and death (Infinity for an essential class), persistence = death - birth, and toTriple = (dim, birth, death), the same shape diagramAt returns.

Plain numbers for a bar over Double filtration values, so callers need not pattern-match on the endpoint types (open/closed makes no difference to the numbers): birth and death (Infinity for an essential class), persistence = death - birth, and toTriple = (dim, birth, death), the same shape diagramAt returns.

Attributes

Source
Barcode.scala
def persistence: Double

Plain numbers for a bar over Double filtration values, so callers need not pattern-match on the endpoint types (open/closed makes no difference to the numbers): birth and death (Infinity for an essential class), persistence = death - birth, and toTriple = (dim, birth, death), the same shape diagramAt returns.

Plain numbers for a bar over Double filtration values, so callers need not pattern-match on the endpoint types (open/closed makes no difference to the numbers): birth and death (Infinity for an essential class), persistence = death - birth, and toTriple = (dim, birth, death), the same shape diagramAt returns.

Attributes

Source
Barcode.scala
def toTriple: (Int, Double, Double)

Plain numbers for a bar over Double filtration values, so callers need not pattern-match on the endpoint types (open/closed makes no difference to the numbers): birth and death (Infinity for an essential class), persistence = death - birth, and toTriple = (dim, birth, death), the same shape diagramAt returns.

Plain numbers for a bar over Double filtration values, so callers need not pattern-match on the endpoint types (open/closed makes no difference to the numbers): birth and death (Infinity for an essential class), persistence = death - birth, and toTriple = (dim, birth, death), the same shape diagramAt returns.

Attributes

Source
Barcode.scala
extension [CellT](bar: PersistenceBar[_, _ <: Chain[CellT, _]])
def birthCell: Option[CellT]

The cells of a bar whose annotation is a chain over them, which is how the cell type is known: bar.birthCell is the cell whose entry creates the class (of the bar's dimension, valued at its birth) and bar.deathCell the one that kills it (one dimension up, valued at its death; none for an essential class). Both are None for a bar from an engine that does not record cells, bar.cells.isDefined telling that apart from an essential bar.

The cells of a bar whose annotation is a chain over them, which is how the cell type is known: bar.birthCell is the cell whose entry creates the class (of the bar's dimension, valued at its birth) and bar.deathCell the one that kills it (one dimension up, valued at its death; none for an essential class). Both are None for a bar from an engine that does not record cells, bar.cells.isDefined telling that apart from an essential bar.

Attributes

Source
Barcode.scala
def deathCell: Option[CellT]

The cells of a bar whose annotation is a chain over them, which is how the cell type is known: bar.birthCell is the cell whose entry creates the class (of the bar's dimension, valued at its birth) and bar.deathCell the one that kills it (one dimension up, valued at its death; none for an essential class). Both are None for a bar from an engine that does not record cells, bar.cells.isDefined telling that apart from an essential bar.

The cells of a bar whose annotation is a chain over them, which is how the cell type is known: bar.birthCell is the cell whose entry creates the class (of the bar's dimension, valued at its birth) and bar.deathCell the one that kills it (one dimension up, valued at its death; none for an essential class). Both are None for a bar from an engine that does not record cells, bar.cells.isDefined telling that apart from an essential bar.

Attributes

Source
Barcode.scala
extension [A](bars: List[PersistenceBar[Double, A]])
def longerThan(minPersistence: Double): List[PersistenceBar[Double, A]]

Filtering a list of bars (no import needed: these are found through the bar type's companion).

Filtering a list of bars (no import needed: these are found through the bar type's companion).

  • bars.longerThan(0.1): essential bars and bars with persistence strictly greater than 0.1.
  • bars.longerThanFraction(): the same, with the threshold 1% of the bars' own filtration range (the MATLAB/CLI default policy; see PersistenceFilter for the scale to pass).

Attributes

Source
Barcode.scala
def longerThanFraction(fraction: Double = ..., scale: Optional[Double] = ...): List[PersistenceBar[Double, A]]

Filtering a list of bars (no import needed: these are found through the bar type's companion).

Filtering a list of bars (no import needed: these are found through the bar type's companion).

  • bars.longerThan(0.1): essential bars and bars with persistence strictly greater than 0.1.
  • bars.longerThanFraction(): the same, with the threshold 1% of the bars' own filtration range (the MATLAB/CLI default policy; see PersistenceFilter for the scale to pass).

Attributes

Source
Barcode.scala