CSV

org.appliedtopology.tda4j.io.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
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
CSV.type

Members list

Value members

Concrete methods

def readFullDistanceMatrix(path: 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

def readLowerTriangularDistanceMatrix(path: 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

def readPersistenceDiagram(path: 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

def readPointCloud(path: String): Array[Array[Double]]

One point per line, coordinates separated by , or whitespace.

One point per line, coordinates separated by , or whitespace.

Attributes

def writeFullDistanceMatrix(path: String, matrix: Array[Array[Double]]): Unit
def writeLowerTriangularDistanceMatrix(path: String, matrix: Array[Array[Double]]): Unit
def writePersistenceDiagram(path: String, bars: Seq[PersistenceBar[Double, _]]): Unit
def writePointCloud(path: String, points: Array[Array[Double]]): Unit