MapAlgebra

org.appliedtopology.tda4j.MapAlgebra
object MapAlgebra

Image, kernel and cokernel of a map of persistence modules that are sums of interval modules, over any field.

The source has bars [b_i, d_i) and the target [b'_j, d'_j); the map is a matrix with a coefficient for each pair of a source bar i and a target bar j, given column by column (columns(i) maps j to the coefficient). A coefficient can be nonzero only where there is a map of interval modules at all, b'_j <= b_i < d'_j <= d_i (isLegal): the generator of bar i, born at b_i, goes to the component of the target alive then, and the source dies no sooner than the component does.

Each result is a list of bars as (bar index, interval); the interval is [birth, death) in the numbers of the input. The three are computed by one kind of reduction, with the elder rule:

  • the image is the submodule of the target generated by the images of the source generators, each born at its bar's birth; reducing the generators in order of birth, with the target components ordered by death, a generator that does not reduce to zero is a bar from its birth to the death of its leading component;
  • the cokernel is the target modulo the image; its generators are the target bars, and the relations are the images of the source generators at their births and each target bar's own death. Taking relations in order of time, with the generators ordered by birth, a relation that does not reduce to zero kills the youngest generator in it at its time;
  • the kernel is the cokernel of the dual map, in the reversed order of the filtration (a bar [b, d) becomes [-d, -b)).

The tests check all three against the ranks of the structure maps of the modules, computed by linear algebra.

Attributes

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

Members list

Type members

Classlikes

final case class Interval(birth: Double, death: Double)

A bar as the numbers of its endpoints; death may be Infinity.

A bar as the numbers of its endpoints; death may be Infinity.

Attributes

Source
MapAlgebra.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Value members

Concrete methods

def cokernel[C](source: IndexedSeq[Interval], target: IndexedSeq[Interval], columns: IndexedSeq[Map[Int, C]])(using fr: is[C, Field]): List[(Int, Interval)]

The bars of the cokernel, as (target bar, [its birth, the time its generator is killed)): one for each target bar that is not killed at its own birth, with the target bar's death if nothing kills it sooner.

The bars of the cokernel, as (target bar, [its birth, the time its generator is killed)): one for each target bar that is not killed at its own birth, with the target bar's death if nothing kills it sooner.

Attributes

Source
MapAlgebra.scala
def image[C](source: IndexedSeq[Interval], target: IndexedSeq[Interval], columns: IndexedSeq[Map[Int, C]])(using fr: is[C, Field]): List[(Int, Interval)]

The bars of the image, as (source bar, [birth of the source bar, death of the leading target component)).

The bars of the image, as (source bar, [birth of the source bar, death of the leading target component)).

Attributes

Source
MapAlgebra.scala
def isLegal(s: Interval, t: Interval): Boolean

Whether a nonzero coefficient from source bar s to target bar t is a map of interval modules.

Whether a nonzero coefficient from source bar s to target bar t is a map of interval modules.

Attributes

Source
MapAlgebra.scala
def kernel[C](source: IndexedSeq[Interval], target: IndexedSeq[Interval], columns: IndexedSeq[Map[Int, C]])(using fr: is[C, Field]): List[(Int, Interval)]

The bars of the kernel, as (source bar, interval): the cokernel of the transposed map between the reflected modules, reflected back.

The bars of the kernel, as (source bar, interval): the cokernel of the transposed map between the reflected modules, reflected back.

Attributes

Source
MapAlgebra.scala