PersistenceDiagram class

class PersistenceDiagram
__init__(dimension)

Initializes : an empty( no points ) PersistenceDiagram object and sets the dimension attribute( must be integer ) e.g.:

dia = PersistenceDiagram( 1 )
__init__(dimension, point_seq)

Initializes PersistenceDiagram of specified dimension from the given sequence seq of Point objects, e.g.:

dia = PersistenceDiagram( 1, [Point(1,2)] )
append(p)

Adds point p to the persistence diagram.

dimension

Dimension of the persistence diagram. Must be an integer. Must be set at initialization.

__iter__()

Iterator over the points in the persistence diagram, e.g.:

for p in dia: print p
__len__()
Returns:The number of points in the diagram.

Utility functions for persistence diagrams

bottleneck_distance(dia1, dia2)

Calculates the bottleneck distance between the two persistence diagrams.

class Point
__init__(x, y[, data])

Initializes Point with the given real-valued coordinates and optionally real value data, e.g.:

s = Point( 1, 1.1, 1.11 )
x

x coordinate of the point

y

y coordinate of the point

data

Real value stored in the simplex.

__iter__()

Point objects are iterable, returning two or three elements depending on presence of data, e.g.:

p = Point( 1, 1.1, 1.11 )
for i in p:  print p

1
1.1
1.11