Python interface to compute Morse Sequence in C++
Project description
Morse-Sequence
Repository created for the report of an internship as an assistant of research at ESIEE PARIS under Mr. NAJMAN L. Based on the library SimplexTree to compute Morse Sequences and F-Sequences from a simplicial complex.
Prerequisites
You will first need to install the library SimplexTree either via pip or locally. Refer to the following for more information: simplextree-py
C++ and Python compilers are also necessary.
How to install morse_sequence
Clone with submodules
git clone --recurse-submodules https://github.com/RussianDoggo21/Morse_Sequence.git
cd Morse-Sequence
Installation (standard)
To build and install the package, run:
pip install .
This will compile the C++ code via Meson and install the package.
Installation in development mode (editable)
If you want to install the package in editable mode to develop locally:
pip install --no-build-isolation --editable .
This allows you to modify the code without reinstalling after every change.
Usage example
from morse_sequence import MorseSequence
from simplextree import SimplexTree
st = SimplexTree([[1,2,3]]) # Creation of simplicial complex via the library SimplexTree
ms = MorseSequence(st) # MorseSequence created
morse_seq_dec, n_crit_dec = ms.ms_decreasing(st) # Computation of a decreasing Morse Sequence on st and its critical simplices
print(f"Critical simplices = {n_crit_dec}") # Critical simplices = 1
print(f"Decreasing Morse Sequence = {morse_seq_dec}") # Decreasing Morse Sequence = [((2, 3), (1, 2, 3)), ((3,), (1, 3)), ((1,), (1, 2)), [(2,)]]
morse_seq_inc, n_crit_inc = ms.ms_increasing(st) # Computation of an increasing Morse Sequence on st and its critical simplices
print(f"Critical simplices = {n_crit_inc}") # Critical simplices = 1
print(f"Increasing Morse Sequence = {morse_seq_inc}") # Increasing Morse Sequence = [[1], ([3], [1, 3]), ([2], [2, 3]), ([1, 2], [1, 2, 3])]
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file morse_sequence-0.1.0-py2.py3-none-any.whl.
File metadata
- Download URL: morse_sequence-0.1.0-py2.py3-none-any.whl
- Upload date:
- Size: 12.7 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
db9932c484aa6901928ee6005d7dfcc2be66cc26eb09df7bf9f234eb5817a2e2
|
|
| MD5 |
6680b4b1d631291c29996064a1ea07a7
|
|
| BLAKE2b-256 |
f150a9f61979b49bb4d517f08e743624fb5a5304982179901e06c056e6a7b221
|