Skip to content

A library for computing topological data structures stemming from Morse Theory. Given a set of arbitrarily arranged points in any dimension, this library is able to construct approximate topological structures using a neighborhood graph to simulate manifold structures.

License

edmondztt/topopy

 
 

Repository files navigation

topopy

PyPI

Build Status

Coverage Status

Documentation Status

Pyup

topopy

A library for computing topological data structures stemming from Morse Theory. Given a set of arbitrarily arranged points in any dimension, this library is able to construct approximate topological structures using a neighborhood graph to simulate manifold structures.

Installation

Currently, you can use pip to install this package and all of its prerequisite libraries:

pip install topopy

Or to install from source, install all of the prerequiste libraries:

And then clone and build the source repository:

git clone https://github.com/maljovec/topopy.git
cd topopy
make
python setup.py [develop|install]

Example Usage

import topopy
import numpy as np

def hill(_x):
    _x = np.atleast_2d(_x)
    x = _x[:, 0]
    y = _x[:, 1]
    return np.exp(- ((x - .55)**2 + (y-.75)**2)/.125) + 0.01*(x+y)

X = np.random.rand(100,2)
Y = hill(X)

msc = topopy.MorseSmaleComplex(graph='beta skeleton',
                               gradient='steepest',
                               normalization='feature',
                               connect=True)
msc.build(X, Y)
msc.get_partitions()

About

A library for computing topological data structures stemming from Morse Theory. Given a set of arbitrarily arranged points in any dimension, this library is able to construct approximate topological structures using a neighborhood graph to simulate manifold structures.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 77.0%
  • C++ 22.9%
  • Makefile 0.1%