PySheaf: Sheaf-theoretic toolbox
Full documentation is at http://kb1dds.github.io/pysheaf/
You can install by cloning this repo (there is no PyPI package). For Linux, you can do:
$ git clone https://github.com/kb1dds/pysheaf.git $ pip install pysheaf
See the documentation for full details! (Though it's a bit out of date...)
The general plan of usage is
- First (usually on paper!) lay out the cell complex that will serve as the base for your sheaf. Label each cell with a unique index, starting from zero.
- Determine all of the stalks over each cell, and the restriction maps from lower dimension to higher. Restriction maps can be a mixture of numpy matrices or instances of LinearMorphism, SetMorphism, or SheafMorphism.
- Construct a Sheaf instance from a list of SheafCell instances, all at once using the information from the previous two steps.
- Analyze the resulting sheaf:
- If you have data, you can build Assignment instances whose list of AssignmentCell instances refer to your sheaf.
- You can compute cohomology of the Sheaf instance as well.
Have a look at the pysheaf/tests folder for some examples!
This code is under active development, so not everything works as it should. If you find anything that you can correct, feel free to send me suggestions!
|||Cliff Joslyn, Emilie Hogan, Michael Robinson, "Towards a topological framework for integrating semantic information sources," Semantic Technologies for Intelligence, Defense, and Security (STIDS), 2014. http://ceur-ws.org/Vol-1304/STIDS2014_P2_JoslynEtAl.pdf|
|||Michael Robinson, "Sheaves are the canonical datastructure for information integration," Information Fusion, 36 (2017), pp. 208-224. (preprint version is http://arxiv.org/abs/1603.01446)|
|||Michael Robinson, "Sheaf and cosheaf methods for analyzing multi-model systems," http://arXiv.org/abs/1604.04647|
|||Michael Robinson, Topological Signal Processing, Springer, 2014.|