09-alpha-shapes.py
author Dmitriy Morozov <dmitriy@mrzv.org>
Mon, 18 Jun 2012 10:04:58 -0700
changeset 5 9acb920a945c
parent 2 4b3728f0d920
permissions -rw-r--r--
Added PDF of the talk

from math import sqrt

def alpha_shapes_diagrams(points):
    f = Filtration()
    fill_alpha_complex(points, f)
    f.sort(dim_data_cmp)
    p = StaticPersistence(f)
    p.pair_simplices()
    dgms = init_diagrams(p, f, lambda s: sqrt(s.data[0]))
    return dgms