ParallelPackedCohomology
The engine behind Persistence.Engine.ParallelRipser (#192, #194, #220): Vietoris-Rips persistent cohomology over F_p on implicit coboundaries, as the packed Ripser engine computes it (clearing, apparent pairs, a heap working column, cofacets enumerated on the fly), with each degree's columns cut into units of whole edge blocks and the units reduced in parallel. A column whose pivot leaves its unit is deferred: the deferred columns go on in parallel while their pivots are owned by the units' pairs (phase 2a), then one by one in the sequential order (phase 2b). The pairs, and the reduction log of every column, are those of one sequential reduction in the same order.
A simplex is one Long key: its block (1 + the rank of its last longest edge, edges ranked by length and then by an EdgeTies order, the lexicographic one unless asked otherwise; 0 for a vertex) above its combinatorial index index, or mask - index when a larger index is older (the default, as in the packed engine; BlockOrder chooses). Within one dimension, ascending keys are the filtration order, oldest first. When the block and the index do not fit in one Long together (Space.wide), a key is the index part alone, which still names the simplex within its dimension, and the block beside it in every array, heap and column that orders keys; the order is then by block, then key. Coefficients are Ints mod p.
persistence(space, threads, unitsPerThread, ...) cuts each degree into threads * unitsPerThread units; they run on the threads Parallel has where the call is (Parallel.withThreads(n), else the common pool), one after the other when threads is 1 and on JavaScript. threads 1 with 1 unit per thread is the sequential reduction. The command-line driver is ParallelPackedCohomologyDriver (JVM, in the test tree).
Attributes
- Experimental
- true
- Source
- ParallelPackedCohomology.scala
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
Members list
Type members
Classlikes
Which of two simplices of one dimension filed under the same block (the same last longest edge) enters the filtration first, by combinatorial index: the index of {v_0 < ... < v_k} is C(v_k, k + 1) + ... + C(v_0, 1), the order of the combinatorial number system. Every direction gives the same barcode; they differ in which pairs are apparent, since the oldest cofacet of a column and the youngest facet of a cofacet are the ones that add and drop the largest vertex outside the block's edge in one direction, and the smallest in the other.
Which of two simplices of one dimension filed under the same block (the same last longest edge) enters the filtration first, by combinatorial index: the index of {v_0 < ... < v_k} is C(v_k, k + 1) + ... + C(v_0, 1), the order of the combinatorial number system. Every direction gives the same barcode; they differ in which pairs are apparent, since the oldest cofacet of a column and the youngest facet of a cofacet are the ones that add and drop the largest vertex outside the block's edge in one direction, and the smallest in the other.
LargerIndexFirst(default): the larger index is older: Ripser's own order within a diameter. The oldest cofacet of a column adds the largest qualifying vertex.SmallerIndexFirst: the smaller index is older: the order of Bauer's hybrid andripser-forest(ORDER_CONVENTIONS.mdofripser-dev). The oldest cofacet adds the smallest qualifying vertex.
Vertices (which share block 0) and the simplices of dimension 1 (one to a block) follow it too, which changes which vertex of a merging pair is the older and so only the pairing of degree 0, never its bars.
Attributes
- Companion
- object
- Source
- ParallelPackedCohomology.scala
- Supertypes
-
trait Enumtrait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Attributes
- Companion
- enum
- Source
- ParallelPackedCohomology.scala
- Supertypes
-
trait Sumtrait Mirrorclass Objecttrait Matchableclass Any
- Self type
-
BlockOrder.type
A column whose pivot left its unit: its working column (blocks as in Owner) and its reduction log so far.
A column whose pivot left its unit: its working column (blocks as in Owner) and its reduction log so far.
Attributes
- Source
- ParallelPackedCohomology.scala
- Supertypes
-
class Objecttrait Matchableclass Any
One degree's pairs (birth key, death key or -1), its owners with reduced columns, its logs.
One degree's pairs (birth key, death key or -1), its owners with reduced columns, its logs.
Attributes
- Source
- ParallelPackedCohomology.scala
- Supertypes
-
class Objecttrait Matchableclass Any
base with the length of every edge within threshold replaced by its rank, 1, 2, ... in the order of an EdgeRanking (0 on the diagonal, infinity past the threshold). An engine that orders simplices by diameter and then by index, run on this, orders them by their last edge in that ranking: ripser.cpp's edge-lexicographic order for EdgeTies.ReverseColexicographic (EDGE_LEXICOGRAPHIC), and the order of the other EdgeTies as they are named. Give the engine limit as its maxFiltrationValue, and read what comes back in lengths with lengthOf. Memory: the ranking, a dense table of n^2 Ints up to DenseRankLimit points, sorted neighbour lists above.
base with the length of every edge within threshold replaced by its rank, 1, 2, ... in the order of an EdgeRanking (0 on the diagonal, infinity past the threshold). An engine that orders simplices by diameter and then by index, run on this, orders them by their last edge in that ranking: ripser.cpp's edge-lexicographic order for EdgeTies.ReverseColexicographic (EDGE_LEXICOGRAPHIC), and the order of the other EdgeTies as they are named. Give the engine limit as its maxFiltrationValue, and read what comes back in lengths with lengthOf. Memory: the ranking, a dense table of n^2 Ints up to DenseRankLimit points, sorted neighbour lists above.
Attributes
- Source
- ParallelPackedCohomology.scala
- Supertypes
The edges of a metric within a threshold, ranked by length and then by an EdgeTies order, with each edge's rank looked up in a dense n x n table (up to DenseRankLimit points) or in sorted neighbour lists. A rank is a position in the filtration order of the edges: it is what Space files a simplex under, and what EdgeRankedMetricSpace hands an engine in place of the length.
The edges of a metric within a threshold, ranked by length and then by an EdgeTies order, with each edge's rank looked up in a dense n x n table (up to DenseRankLimit points) or in sorted neighbour lists. A rank is a position in the filtration order of the edges: it is what Space files a simplex under, and what EdgeRankedMetricSpace hands an engine in place of the length.
Attributes
- Source
- ParallelPackedCohomology.scala
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
-
class Space
How edges of one length are ranked, which decides the edge a simplex is filed under: its block is that of the last, in this order, of its longest edges. Every order gives the same barcode; they differ in which zero-length pairs form and so in how many columns need reducing. An edge is {a, b} with a < b; its combinatorial index is C(b, 2) + a.
How edges of one length are ranked, which decides the edge a simplex is filed under: its block is that of the last, in this order, of its longest edges. Every order gives the same barcode; they differ in which zero-length pairs form and so in how many columns need reducing. An edge is {a, b} with a < b; its combinatorial index is C(b, 2) + a.
Lexicographic(default): bya, then byb, ascending. The simplex's block is the lexicographically largest of its longest edges. This is Bauer's--ties lexicographic(ripser-dev,hybrid/pruned.cpp).ReverseLexicographic: bya, then byb, descending.Colexicographic: byb, then bya, ascending: increasing combinatorial index. The block is that of the largest-index longest edge: the order of Bauer's hybrid andripser-forest(--ties increasing, their default).ReverseColexicographic: decreasing combinatorial index. The block is that of the smallest-index longest edge: Ripser's own order of equal edges, as inripser.cppbuilt withEDGE_LEXICOGRAPHIC(--ties decreasing).Shuffled: by a fixed hash of the combinatorial index (Bauer's--ties random): a control that has no structure to exploit.
Attributes
- Companion
- object
- Source
- ParallelPackedCohomology.scala
- Supertypes
-
trait Enumtrait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Attributes
- Companion
- enum
- Source
- ParallelPackedCohomology.scala
- Supertypes
-
trait Sumtrait Mirrorclass Objecttrait Matchableclass Any
- Self type
-
EdgeTies.type
A working column: a binary min-heap of (key, coefficient), equal keys combined when they reach the top. With two-word keys (wide) each entry also holds its block, and entries are ordered by block, then key.
A working column: a binary min-heap of (key, coefficient), equal keys combined when they reach the top. With two-word keys (wide) each entry also holds its block, and entries are ordered by block, then key.
Attributes
- Source
- ParallelPackedCohomology.scala
- Supertypes
-
class Objecttrait Matchableclass Any
The columns added to one column, with their factors: V = column + sum of factor * V(added).
The columns added to one column, with their factors: V = column + sum of factor * V(added).
Attributes
- Source
- ParallelPackedCohomology.scala
- Supertypes
-
class Objecttrait Matchableclass Any
The column that owns a pivot, with its block: its reduced coboundary, or null arrays when that is its own coboundary (blocks: the reduced column's blocks, for two-word keys only); pivotBlock the pivot's block, or -1 for an owner that is only looked up.
The column that owns a pivot, with its block: its reduced coboundary, or null arrays when that is its own coboundary (blocks: the reduced column's blocks, for two-word keys only); pivotBlock the pivot's block, or -1 for an owner that is only looked up.
Attributes
- Source
- ParallelPackedCohomology.scala
- Supertypes
-
class Objecttrait Matchableclass Any
Attributes
- Source
- ParallelPackedCohomology.scala
- Supertypes
-
class Objecttrait Matchableclass Any
The edges within the threshold ranked, and the key encoding.
The edges within the threshold ranked, and the key encoding.
Attributes
- Source
- ParallelPackedCohomology.scala
- Supertypes
Per-degree counts and times.
Per-degree counts and times.
Attributes
- Source
- ParallelPackedCohomology.scala
- Supertypes
-
class Objecttrait Matchableclass Any
Value members
Concrete methods
Attributes
The coboundary of a cochain of keys of size k, as a map key -> coefficient (zeros dropped).
The coboundary of a cochain of keys of size k, as a map key -> coefficient (zeros dropped).
Attributes
V for a column: the column plus factor * V(added) over its log, expanded depth-first without recursion.
V for a column: the column plus factor * V(added) over its log, expanded depth-first without recursion.
Attributes
Every bar of degrees 0 .. maxDim; unitsPerThread 1 with threads 1 is the sequential reduction.
Every bar of degrees 0 .. maxDim; unitsPerThread 1 with threads 1 is the sequential reduction.
Attributes
Concrete fields
Up to this many points the rank of an edge is looked up in a dense n x n table (at most 64 MB); above it, in the sorted neighbour list of one end (memory proportional to the edges, and no n x n array). The table is about a quarter faster where nearly every pair is an edge; the lists need a fifth of the memory on sparse graphs.
Up to this many points the rank of an edge is looked up in a dense n x n table (at most 64 MB); above it, in the sorted neighbour list of one end (memory proportional to the edges, and no n x n array). The table is about a quarter faster where nearly every pair is an edge; the lists need a fifth of the memory on sparse graphs.
Attributes
The most edges a Space takes: they are indexed by Int ranks in arrays.
The most edges a Space takes: they are indexed by Int ranks in arrays.
Attributes
The largest prime a run can use: coefficients are Ints, and (p - 1)^2 + p must not overflow.
The largest prime a run can use: coefficients are Ints, and (p - 1)^2 + p must not overflow.