/PySimplex

PySimplex is being Tried to implementation of topology operations on simplex tree.

Primary LanguagePythonMIT LicenseMIT

PySimplex

The simplex tree is an efficient data structure for representing simplicial complex of any dimension. All of face in simplicial complex store in a trie which nodes are bijection with the face of complex. alt text

Getting Started

Let's start simple example of PySimplex in 3 dimension:

    def insert_childs(self, list_childs):
        if len(list_childs) > 0:
            if not (self.has_child(list_childs[self.HEAD])):
                self.set_childs(list_childs[self.HEAD])
                return
            if self.has_child(list_childs[self.HEAD]):
                list_recursion = []
                for i in range(len(list_childs)):
                    if i <> 0:
                        list_recursion.append(list_childs[i])
                self.get_child(list_childs[self.HEAD]).insert_childs(list_recursion)
        return

You can create complex with TkInter package(Graphical User Interface) as follow,

alt text

in the first textbox enter number of vertex of complex

either can you use the second textbox enter flag complex, or you can use the
third textbox for creation of your complexs

in the forth textbox you can delete face from complex

alt text

Requirements

  • Python >= 2.7

PySimplex has no external dependencies outside of the Python standard library.

Contributors

|
Hossein Teimoori Faal

References

License

This project is licensed under the MIT License - see the LICENSE.md file for details.