Dipha

org.appliedtopology.tda4j.Dipha
object Dipha

DIPHA's binary formats: little-endian, each file starting with the magic number 8067171840 and an Int64 file type. DIPHA images list the first axis fastest, the opposite of CubicalImage.fromFlatArray; the readers and writers convert.

Attributes

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

Members list

Value members

Concrete methods

def formatDistanceMatrix(matrix: Array[Array[Double]]): Array[Byte]

Attributes

Source
Dipha.scala
def formatImageData(shape: IndexedSeq[Int], flatValues: IndexedSeq[Double]): Array[Byte]

Attributes

Source
Dipha.scala
def formatPersistenceDiagram(bars: Seq[PersistenceBar[Double, _]]): Array[Byte]

Attributes

Source
Dipha.scala
def parseDistanceMatrix(bytes: Array[Byte]): Array[Array[Double]]

readDistanceMatrix on the bytes of such a file.

readDistanceMatrix on the bytes of such a file.

Attributes

Source
Dipha.scala
def parseImageData(bytes: Array[Byte]): (IndexedSeq[Int], IndexedSeq[Double])

readImageData on the bytes of such a file.

readImageData on the bytes of such a file.

Attributes

Source
Dipha.scala
def parsePersistenceDiagram(bytes: Array[Byte]): Seq[PersistenceBar[Double, Nothing]]

readPersistenceDiagram on the bytes of such a file.

readPersistenceDiagram on the bytes of such a file.

Attributes

Source
Dipha.scala
def readCubicalGridStream(path: String, sublevel: Boolean = ..., nanMask: Boolean = ...): CubicalGridStream

The image data of path as a grid; nanMask = false makes a NaN value an error instead of a masked pixel.

The image data of path as a grid; nanMask = false makes a NaN value an error instead of a masked pixel.

Attributes

Source
Dipha.scala
def readDistanceMatrix(path: String): Array[Array[Double]]

DISTANCE_MATRIX (file type 7): magic, type, n (Int64), then n*n Float64 values in plain row-major order (d(1,1)...d(1,n) d(2,1)...d(n,n) per the README) -- the FULL matrix, diagonal included, not a triangular packing.

DISTANCE_MATRIX (file type 7): magic, type, n (Int64), then n*n Float64 values in plain row-major order (d(1,1)...d(1,n) d(2,1)...d(n,n) per the README) -- the FULL matrix, diagonal included, not a triangular packing.

Attributes

Source
Dipha.scala

Attributes

Source
Dipha.scala
def readImageData(path: String): (IndexedSeq[Int], IndexedSeq[Double])

IMAGE_DATA (file type 1): magic, type, n (Int64, total value count), d (Int64, dimension), d Int64 grid sizes g(1)...g(d) (g(1) fastest-varying), then n Float64 values in "x-fastest" order. Returned as (shape, flatValues) in CubicalImage.fromFlatArray's own last-axis-fastest convention -- i.e. shape here is g.reverse, not g -- ready to pass straight to fromFlatArray/readCubicalGridStream.

IMAGE_DATA (file type 1): magic, type, n (Int64, total value count), d (Int64, dimension), d Int64 grid sizes g(1)...g(d) (g(1) fastest-varying), then n Float64 values in "x-fastest" order. Returned as (shape, flatValues) in CubicalImage.fromFlatArray's own last-axis-fastest convention -- i.e. shape here is g.reverse, not g -- ready to pass straight to fromFlatArray/readCubicalGridStream.

Attributes

Source
Dipha.scala
def readPersistenceDiagram(path: String): Seq[PersistenceBar[Double, Nothing]]

A PERSISTENCE_DIAGRAM file (type 2): the count, then (dim, birth, death) triples (Int64, Float64, Float64). A dimension -k marks an essential class of dimension k - 1, whose death is ignored (written 0.0).

A PERSISTENCE_DIAGRAM file (type 2): the count, then (dim, birth, death) triples (Int64, Float64, Float64). A dimension -k marks an essential class of dimension k - 1, whose death is ignored (written 0.0).

Attributes

Source
Dipha.scala
def writeDistanceMatrix(path: String, matrix: Array[Array[Double]]): Unit

Attributes

Source
Dipha.scala
def writeImageData(path: String, shape: IndexedSeq[Int], flatValues: IndexedSeq[Double]): Unit

shape/flatValues in CubicalImage.fromFlatArray's own last-axis-fastest convention -- reversed internally to DIPHA's own g(1)-fastest convention before writing (the inverse of readImageData's own reversal).

shape/flatValues in CubicalImage.fromFlatArray's own last-axis-fastest convention -- reversed internally to DIPHA's own g(1)-fastest convention before writing (the inverse of readImageData's own reversal).

Attributes

Source
Dipha.scala
def writePersistenceDiagram(path: String, bars: Seq[PersistenceBar[Double, _]]): Unit

Attributes

Source
Dipha.scala