Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

morse_sequence-0.1.0-py2.py3-none-any.whl (12.7 kB view details)

Uploaded Python 2Python 3

File details

Details for the file morse_sequence-0.1.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for morse_sequence-0.1.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 db9932c484aa6901928ee6005d7dfcc2be66cc26eb09df7bf9f234eb5817a2e2
MD5 6680b4b1d631291c29996064a1ea07a7
BLAKE2b-256 f150a9f61979b49bb4d517f08e743624fb5a5304982179901e06c056e6a7b221

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page