CSV

org.appliedtopology.tda4j.CSV
object CSV

Generic delimited-text point clouds, distance matrices, and persistence diagrams -- fields split on , or any run of whitespace, so plain-whitespace-separated files (Dionysus/JavaPlex's own convention) parse with these same methods too.

Attributes

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

Members list

Value members

Concrete methods

def formatBar(bar: PersistenceBar[Double, _]): String

One bar as a line of the format (dimension,lower,upper), without the line break.

One bar as a line of the format (dimension,lower,upper), without the line break.

Attributes

Source
CSV.scala
def formatFullDistanceMatrix(matrix: Array[Array[Double]]): String

Attributes

Source
CSV.scala
def formatLowerTriangularDistanceMatrix(matrix: Array[Array[Double]]): String

Attributes

Source
CSV.scala
def formatPersistenceDiagram(bars: Seq[PersistenceBar[Double, _]]): String

Attributes

Source
CSV.scala
def formatPointCloud(points: Array[Array[Double]]): String

The text of a point cloud file: one point per line.

The text of a point cloud file: one point per line.

Attributes

Source
CSV.scala
def parseFullDistanceMatrix(text: String, origin: String = ...): Array[Array[Double]]

A full n x n distance matrix, one row per line -- both triangles and the diagonal are read as given; this does NOT check that they agree (a caller wanting that checked should build from readLowerTriangularDistanceMatrix instead, which only ever reads one triangle).

A full n x n distance matrix, one row per line -- both triangles and the diagonal are read as given; this does NOT check that they agree (a caller wanting that checked should build from readLowerTriangularDistanceMatrix instead, which only ever reads one triangle).

Attributes

Source
CSV.scala
def parseLowerTriangularDistanceMatrix(text: String, origin: String = ...): Array[Array[Double]]

Row i (i = 1 until n) has exactly i entries, d(i,0),...,d(i,i-1) -- no diagonal, no upper triangle, and row 0 (which would have zero entries) is omitted entirely rather than written as a blank line -- so an n-point matrix is n-1 physical lines, the same row layout Ripser's own text formats use, just one row per physical line instead of one flat token stream spanning line breaks (see Ripser.readLowerDistanceMatrix, which reads the identical convention).

Row i (i = 1 until n) has exactly i entries, d(i,0),...,d(i,i-1) -- no diagonal, no upper triangle, and row 0 (which would have zero entries) is omitted entirely rather than written as a blank line -- so an n-point matrix is n-1 physical lines, the same row layout Ripser's own text formats use, just one row per physical line instead of one flat token stream spanning line breaks (see Ripser.readLowerDistanceMatrix, which reads the identical convention).

Attributes

Source
CSV.scala
def parsePersistenceDiagram(text: String): Seq[PersistenceBar[Double, Nothing]]

dim,birth,death per line, no header, no comments -- death (or birth) may be inf/-inf/infinity (any case) for an infinite endpoint. See Gudhi.readPersistenceDiagram for a format that also supports comments and an optional coefficient-field column.

dim,birth,death per line, no header, no comments -- death (or birth) may be inf/-inf/infinity (any case) for an infinite endpoint. See Gudhi.readPersistenceDiagram for a format that also supports comments and an optional coefficient-field column.

Attributes

Source
CSV.scala
def parsePointCloud(text: String, origin: String = ...): Array[Array[Double]]

One point per line, coordinates separated by , or whitespace. origin names the text in error messages.

One point per line, coordinates separated by , or whitespace. origin names the text in error messages.

Attributes

Source
CSV.scala

Attributes

Source
CSV.scala

Attributes

Source
CSV.scala
def readFullDistanceMatrix(path: String): Array[Array[Double]]

Attributes

Source
CSV.scala
def readLowerTriangularDistanceMatrix(path: String): Array[Array[Double]]

Attributes

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

Attributes

Source
CSV.scala
def readPointCloud(path: String): Array[Array[Double]]

Attributes

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

Attributes

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

Attributes

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

Attributes

Source
CSV.scala
def writePointCloud(path: String, points: Array[Array[Double]]): Unit

Attributes

Source
CSV.scala