/simplex-tree

Simplex Tree Implmentation in Python

Primary LanguagePython

Simplex tree

This library contains the implementation of Simplex Tree data structure which is used to store the simplicial complex. The implementation is completely based on the research paper "The Simplex Tree: An Efficient Data Structure for General Simplicial Complexes" by Jean-Daniel Boissonnat, Clément Maria (https://hal.inria.fr/file/index/docid/707901/filename/RR-7993.pdf)

image

About Project

This project is a part of coursework E0 207 : Computational Topology : Theory and Applications offered at CSA, Indian Institute of Science.

Installation

pip install pytopology

Example Usage

from pytopology import SimplexTree

simp = SimplexTree()
simp.insert([1,2,3],4.)
simp.printTree()

Output

Simplex: [1] Filtration value : 2.0
Simplex: [1, 2] Filtration value : 3.0
Simplex: [1, 2, 3] Filtration value : 4.0
Simplex: [1, 3] Filtration value : 4.0
Simplex: [2] Filtration value : 3.0
Simplex: [2, 3] Filtration value : 4.0
Simplex: [3] Filtration value : 4.0

Visualizing the Simplex

from pytopology import SimplexTree

simp = SimplexTree()
sim.insert([1, 2, 3])
sim.insert([2, 3, 4, 5])
sim.insert([6, 7, 9])
sim.insert([7, 8])
sim.insert([10])
simp.draw_simplex3D()

image image image image

Operations on Simplicial Complex

  • Insert
  • Find (Query)
  • Boundary
  • Print
  • Filtration (with recursive propagation)
  • Visualization
  • Get Dimension
  • NumVertices, NumSimplices, Skeleton
  • CoFace, Star, Link

Contributors