PersistenceResult
A finished persistence computation, in a shape callable directly from MATLAB (or any other plain-Java caller) via MATLAB's built-in Java interface: every public method here takes/returns only int, double, double[][], int[][], or another PersistenceResult handle (MATLAB's Java bridge holds and passes those around like any other Java object -- already established by TDA4j.computeFrom* itself returning one) -- no other Scala types, no generics, no java.util.Map -- since none of those marshal reliably across MATLAB's Java bridge. See TDA4j for how this gets constructed and WORKLOG-matlab-api.md for the design rationale, including what was deliberately left out of this first pass.
Bars are indexed 0 until size() - 1, in no particular guaranteed order (the underlying engines don't sort their output beyond grouping by dimension). An essential (never-dying) class reports death(i) == Double.POSITIVE_INFINITY.
Representative-chain access (cycleVertices/cycleCoefficients) is engine-dependent in what kind of chain it returns, not in whether one is available -- every engine records one for every bar; see the per-method doc. For engine="ripser" the chain is a representative cocycle; for engine="naive" it is a representative cycle. Both are reported the same way here (a list of simplices, each given as its sorted vertex array, with a parallel coefficient array) because MATLAB-side code that only wants "the simplices spanning this bar" doesn't need to care which.
Attributes
- Experimental
- true
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
Members list
Value members
Concrete methods
Bottleneck distance (.claude/WORKLOG-mainstream-feature-gap-analysis.md item 4) between this result's and other's dimension-dimension bars, under the L-infinity ground norm -- see barcode.BarcodeDistance for the full matching/essential-bar policy this implements. Double.PositiveInfinity back means the two diagrams have different numbers of essential (never-dying) classes in this dimension, so no finite matching exists; that is a real answer, not a failure.
Bottleneck distance (.claude/WORKLOG-mainstream-feature-gap-analysis.md item 4) between this result's and other's dimension-dimension bars, under the L-infinity ground norm -- see barcode.BarcodeDistance for the full matching/essential-bar policy this implements. Double.PositiveInfinity back means the two diagrams have different numbers of essential (never-dying) classes in this dimension, so no finite matching exists; that is a real answer, not a failure.
Attributes
As the two-argument bottleneckDistance, under an explicit ground norm (see toGroundNorm's own doc for the Double.PositiveInfinity-means-L-infinity convention).
As the two-argument bottleneckDistance, under an explicit ground norm (see toGroundNorm's own doc for the Double.PositiveInfinity-means-L-infinity convention).
Attributes
Column indices parallel to boundaryRows -- see that method's own doc.
Row indices of the boundary matrix's nonzero entries (0-based, parallel to boundaryCols/boundaryValues): row i/column j means cell j's boundary includes cell i with coefficient boundaryValues()(k). Every complex/engine combination TDA4j supports populates this (see that class's buildBoundaryMatrix) -- rebuild in MATLAB as sparse(rows()+1, cols()+1, values(), n, n) (MATLAB's sparse is 1-based; every index in this facade, including this one, is 0-based, matching cycleVertices's own convention).
Row indices of the boundary matrix's nonzero entries (0-based, parallel to boundaryCols/boundaryValues): row i/column j means cell j's boundary includes cell i with coefficient boundaryValues()(k). Every complex/engine combination TDA4j supports populates this (see that class's buildBoundaryMatrix) -- rebuild in MATLAB as sparse(rows()+1, cols()+1, values(), n, n) (MATLAB's sparse is 1-based; every index in this facade, including this one, is 0-based, matching cycleVertices's own convention).
Attributes
Coefficients parallel to boundaryRows/boundaryCols, reported as double the same way cycleCoefficients is (the representative-integer value cast to double for a finite field, the value itself for the default real-valued field).
Coefficients parallel to boundaryRows/boundaryCols, reported as double the same way cycleCoefficients is (the representative-integer value cast to double for a finite field, the value itself for the default real-valued field).
Attributes
The homological dimension of boundary-matrix column j (0 until numCells) -- the same cell ordering boundaryRows/boundaryCols index into, NOT a bar index (there are generally far more cells than bars).
The homological dimension of boundary-matrix column j (0 until numCells) -- the same cell ordering boundaryRows/boundaryCols index into, NOT a bar index (there are generally far more cells than bars).
Attributes
Column j's own filtration value -- the same quantity birth/death above report per bar, but per CELL here. Needed for anything that truncates the complex to a sub-level set K_r (e.g. circular coordinates: pick r in a target bar's [birth, death), keep only columns/rows with columnFiltrationValue <= r).
Column j's own filtration value -- the same quantity birth/death above report per bar, but per CELL here. Needed for anything that truncates the complex to a sub-level set K_r (e.g. circular coordinates: pick r in a target bar's [birth, death), keep only columns/rows with columnFiltrationValue <= r).
Attributes
Column j's own cell identity, in the same per-complex-type shape cycleVertices documents (a sorted vertex array for Simplex[Int]-based complexes, a doubled-coordinate Cube encoding for cubical ones) -- lets a MATLAB caller relate a solved linear-algebra result (e.g. a cocycle from boundaryValues-derived harmonic smoothing) back to actual cells.
Column j's own cell identity, in the same per-complex-type shape cycleVertices documents (a sorted vertex array for Simplex[Int]-based complexes, a doubled-coordinate Cube encoding for cubical ones) -- lets a MATLAB caller relate a solved linear-algebra result (e.g. a cocycle from boundaryValues-derived harmonic smoothing) back to actual cells.
Attributes
Coefficients parallel to cycleVertices(i). Reported as double regardless of the underlying coefficient field -- for a finite field Z/pZ this is the representative integer value cast to double, for the default real-valued field it's the value itself. See cycleVertices for the exceptions this can throw.
Coefficients parallel to cycleVertices(i). Reported as double regardless of the underlying coefficient field -- for a finite field Z/pZ this is the representative integer value cast to double, for the default real-valued field it's the value itself. See cycleVertices for the exceptions this can throw.
Attributes
The cells making up bar i's representative chain, each as an int[] identifying that cell -- the array's own meaning depends on which complex this result came from, since the underlying cell type differs:
The cells making up bar i's representative chain, each as an int[] identifying that cell -- the array's own meaning depends on which complex this result came from, since the underlying cell type differs:
complex="vr"/"alpha"/"cech"(aSimplex[Int]): the simplex's sorted vertex array (0-based, matching the row indices of whatever point/distance matrix was passed toTDA4j).complex="cubical"(aCube): the cell's own doubled-coordinate encoding (Cube.encoded, seeCubical.scala) -- NOT vertex indices. Axisk's entry is2*afor a degenerate (point) factor at lattice coordinatea, or2*a+1for a non-degenerate (unit-interval) factor spanning[a, a+1]; decode coordinatekasa = v(k)/2(integer division) plus, whenv(k)is odd, a unit interval starting there.
Throws UnsupportedOperationException if this specific bar has no recorded representative. Every engine records one for every bar, at every dimension, for every complex type above, so this indicates an engine bug rather than an expected gap -- see .claude/CLAUDE.md's coefficients-and-representatives design principle for why this matters.
Attributes
The first numLevels persistence landscape functions (Bubenik 2013, .claude/WORKLOG-mainstream-feature-gap- analysis.md item 8) of this result's dimension-dimension bars, sampled at resolution evenly-spaced points across [tMin, tMax] -- see barcode.Vectorization.landscape for the exact sampling convention, the closed-form check it satisfies, and why an essential (never-dying) bar needs no special handling here. Returns levels(k)(j): level k (0 = the outer envelope) at the j-th sample point.
The first numLevels persistence landscape functions (Bubenik 2013, .claude/WORKLOG-mainstream-feature-gap- analysis.md item 8) of this result's dimension-dimension bars, sampled at resolution evenly-spaced points across [tMin, tMax] -- see barcode.Vectorization.landscape for the exact sampling convention, the closed-form check it satisfies, and why an essential (never-dying) bar needs no special handling here. Returns levels(k)(j): level k (0 = the outer envelope) at the j-th sample point.
Attributes
The number of cells (matrix columns/rows) in the full complex this result was computed from -- pass this as n to MATLAB's own sparse(rows()+1, cols()+1, values(), n, n) (see boundaryRows's own doc for the +1).
The number of cells (matrix columns/rows) in the full complex this result was computed from -- pass this as n to MATLAB's own sparse(rows()+1, cols()+1, values(), n, n) (see boundaryRows's own doc for the +1).
Attributes
The persistence image (Adams et al. 2017, .claude/WORKLOG-mainstream-feature-gap-analysis.md item 8) of this result's dimension-dimension bars, with the weight cap defaulted to that diagram's own maximum finite persistence (the paper's suggested default) -- see the eight-argument overload to pass one explicitly, and barcode.Vectorization.persistenceImage for the exact construction (isotropic Gaussian bumps in birth-persistence coordinates, exact per-pixel integration, piecewise-linear weighting) and why essential (never-dying) bars are dropped rather than given a special-cased value. Returns image(r)(c): r indexes birthResolution pixels spanning [birthMin, birthMax], c indexes persistenceResolution pixels spanning [persistenceMin, persistenceMax].
The persistence image (Adams et al. 2017, .claude/WORKLOG-mainstream-feature-gap-analysis.md item 8) of this result's dimension-dimension bars, with the weight cap defaulted to that diagram's own maximum finite persistence (the paper's suggested default) -- see the eight-argument overload to pass one explicitly, and barcode.Vectorization.persistenceImage for the exact construction (isotropic Gaussian bumps in birth-persistence coordinates, exact per-pixel integration, piecewise-linear weighting) and why essential (never-dying) bars are dropped rather than given a special-cased value. Returns image(r)(c): r indexes birthResolution pixels spanning [birthMin, birthMax], c indexes persistenceResolution pixels spanning [persistenceMin, persistenceMax].
Attributes
As the eight-argument persistenceImage, with an explicit weight cap (the persistence value at and beyond which barcode.Vectorization's piecewise-linear weighting saturates to 1.0) instead of the diagram's own maximum finite persistence.
As the eight-argument persistenceImage, with an explicit weight cap (the persistence value at and beyond which barcode.Vectorization's piecewise-linear weighting saturates to 1.0) instead of the diagram's own maximum finite persistence.
Attributes
The whole barcode as one N-by-3 matrix: column 0 is dimension, column 1 is birth, column 2 is death (+Inf for an essential class). This is the primary, MATLAB-idiomatic way to consume a result -- immediately plottable, sortable, filterable with ordinary MATLAB matrix operations.
The whole barcode as one N-by-3 matrix: column 0 is dimension, column 1 is birth, column 2 is death (+Inf for an essential class). This is the primary, MATLAB-idiomatic way to consume a result -- immediately plottable, sortable, filterable with ordinary MATLAB matrix operations.
Attributes
Wasserstein distance, order 1.0, L-infinity ground norm -- see bottleneckDistance and barcode.BarcodeDistance for the shared essential-bar policy and ground-norm convention.
Wasserstein distance, order 1.0, L-infinity ground norm -- see bottleneckDistance and barcode.BarcodeDistance for the shared essential-bar policy and ground-norm convention.
Attributes
As the two-argument wassersteinDistance, under an explicit order (must be finite and >= 1.0 -- pass Double.PositiveInfinity to bottleneckDistance directly instead, rather than here).
As the two-argument wassersteinDistance, under an explicit order (must be finite and >= 1.0 -- pass Double.PositiveInfinity to bottleneckDistance directly instead, rather than here).
Attributes
As the two-argument wassersteinDistance, under an explicit order and ground norm.