Re: Fast Filtration Creation

Dmitriy Morozov

You can pass simplices straight to the filtration constructor. There are actually three different versions of the constructor, but they are not showing up in the API docs for some reason. I'll need to figure out why.

In other words,

>>> import dionysus as d
>>> simplices = [([2], 4), ([1,2], 5), ([0,2], 6),
...              ([0], 1),   ([1], 2), ([0,1], 3)]
>>> f = d.Filtration(simplices)
>>> print(f)
Filtration with 6 simplices


On Sat, Mar 16, 2019 at 9:36 AM tom <gebhart@...> wrote:
Hi Dimitry,

The docs seem to imply the only way to create a filtration is to loop over simplices and append them to the filtration. Is there a way for this iteration and Simplex object creation to be done within the C++ layer instead of looping and creating objects in Python? For example, if I can create a representation like the simplices variable in the filtration example on the docs, is there a way for me to pass this representation straight into, for example, the filtration's constructor and let it instantiate and add the simplices to the filtration?

Or if this is not possible, what do you suppose the fastest way to create a filtration from list-like representation in Python would be? 


Join to automatically receive all group messages.