h-signature


Nameh-signature JSON
Version 0.0.5 PyPI version JSON
download
home_page
SummaryTopological H-signature
upload_time2023-09-25 01:44:50
maintainer
docs_urlNone
author
requires_python>=3.6
licenseCopyright (c) 2023 University of Michigan ARM Lab Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords topology homology robotics
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # H-Signature

A C++ or Python Library for computing the h-signature as defined in \[1\].

What is the H-signature? In the simplest case, it tells you whether two closed 3D curves are linked, or unlinked. The figure below shows some examples.
![Four visual examples of the H-signature](docs/simple_h.png)

In the general case, the H-signature is computed between one closed curve `$\tau$` and a skeleton of closed curves `$S=\{S_1,\dots,S_m\}$`. In code, each curve is a matrix of [3xN] (C++) or [Nx3] (Python) where N is the number of points in the curve. The H-signature is a vector (ordered list) of integers, where each element correspond to the h-signature of `$\tau$` with respect to one curve in `$S$`.

## Installation

For python:

```shell
pip install h-signature

```

For C++:

```shell
# The only option we offer is building from source with cmake 
git clone git@github.com:UM-ARM-Lab/h-signature.git
cd h-signature
mkdir build
# The only dependency is Eigen3
sudo apt install libeigen3-dev
# Build and run tests
cd build
cmake ..
make
ctest
```

## API

There is only one function!

```python
# Python with numpy
from h_signature.h_signature_np import get_h_signature
# Tau is an [Nx3] numpy array and skeleton is a dict of [3xN] numpy arrays
h_sig = get_h_signature(tau, skeleton)
print(h_sig)
```

```c++
// C++ with Eigen
#include <h_signature/h_signature.hpp>
// The above header has these typedefs
// typedef Eigen::Matrix3Xd Loop;
// typedef std::map<std::string, Eigen::Matrix3Xd> Skeleton;

// And this is the function, that's it! 
HSignature get_h_signature(Loop const &loop, Skeleton const & skeleton);
```

## Citation

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "h-signature",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": "Peter Mitrano <pmitrano@umich.edu>",
    "keywords": "topology,homology,robotics",
    "author": "",
    "author_email": "Peter Mitrano <pmitrano@umich.edu>",
    "download_url": "https://files.pythonhosted.org/packages/df/5b/edffe55ce015a9789733bec6d4c4ccf5398e7e3747009614b33622c52f18/h_signature-0.0.5.tar.gz",
    "platform": null,
    "description": "# H-Signature\n\nA C++ or Python Library for computing the h-signature as defined in \\[1\\].\n\nWhat is the H-signature? In the simplest case, it tells you whether two closed 3D curves are linked, or unlinked. The figure below shows some examples.\n![Four visual examples of the H-signature](docs/simple_h.png)\n\nIn the general case, the H-signature is computed between one closed curve `$\\tau$` and a skeleton of closed curves `$S=\\{S_1,\\dots,S_m\\}$`. In code, each curve is a matrix of [3xN] (C++) or [Nx3] (Python) where N is the number of points in the curve. The H-signature is a vector (ordered list) of integers, where each element correspond to the h-signature of `$\\tau$` with respect to one curve in `$S$`.\n\n## Installation\n\nFor python:\n\n```shell\npip install h-signature\n\n```\n\nFor C++:\n\n```shell\n# The only option we offer is building from source with cmake \ngit clone git@github.com:UM-ARM-Lab/h-signature.git\ncd h-signature\nmkdir build\n# The only dependency is Eigen3\nsudo apt install libeigen3-dev\n# Build and run tests\ncd build\ncmake ..\nmake\nctest\n```\n\n## API\n\nThere is only one function!\n\n```python\n# Python with numpy\nfrom h_signature.h_signature_np import get_h_signature\n# Tau is an [Nx3] numpy array and skeleton is a dict of [3xN] numpy arrays\nh_sig = get_h_signature(tau, skeleton)\nprint(h_sig)\n```\n\n```c++\n// C++ with Eigen\n#include <h_signature/h_signature.hpp>\n// The above header has these typedefs\n// typedef Eigen::Matrix3Xd Loop;\n// typedef std::map<std::string, Eigen::Matrix3Xd> Skeleton;\n\n// And this is the function, that's it! \nHSignature get_h_signature(Loop const &loop, Skeleton const & skeleton);\n```\n\n## Citation\n",
    "bugtrack_url": null,
    "license": "Copyright (c) 2023 University of Michigan ARM Lab  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.  ",
    "summary": "Topological H-signature",
    "version": "0.0.5",
    "project_urls": {
        "Bug Reports": "https://github.com/UM-ARM-Lab/h_signature/issues",
        "Homepage": "https://github.com/UM-ARM-Lab/h_signature",
        "Source": "https://github.com/UM-ARM-Lab/h_signature"
    },
    "split_keywords": [
        "topology",
        "homology",
        "robotics"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8c945bda44b7763baa5f56915b1ef5763be4be04364d5c0497518f3b2b5714aa",
                "md5": "b627548b695bfea26b5e8df6cfaef19b",
                "sha256": "125483a1fe5721d5a76a7c7c442a8d88711d1bef93da10da1690301cd749fa4a"
            },
            "downloads": -1,
            "filename": "h_signature-0.0.5-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "b627548b695bfea26b5e8df6cfaef19b",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 5348,
            "upload_time": "2023-09-25T01:44:48",
            "upload_time_iso_8601": "2023-09-25T01:44:48.502322Z",
            "url": "https://files.pythonhosted.org/packages/8c/94/5bda44b7763baa5f56915b1ef5763be4be04364d5c0497518f3b2b5714aa/h_signature-0.0.5-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "df5bedffe55ce015a9789733bec6d4c4ccf5398e7e3747009614b33622c52f18",
                "md5": "be3404aa96d23388cdd9e7273aef39c6",
                "sha256": "e7bab0d3ec1f9fc11c90454970bf363321845815af3677b601894bf4d462b8fc"
            },
            "downloads": -1,
            "filename": "h_signature-0.0.5.tar.gz",
            "has_sig": false,
            "md5_digest": "be3404aa96d23388cdd9e7273aef39c6",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 4849,
            "upload_time": "2023-09-25T01:44:50",
            "upload_time_iso_8601": "2023-09-25T01:44:50.149339Z",
            "url": "https://files.pythonhosted.org/packages/df/5b/edffe55ce015a9789733bec6d4c4ccf5398e7e3747009614b33622c52f18/h_signature-0.0.5.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-09-25 01:44:50",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "UM-ARM-Lab",
    "github_project": "h_signature",
    "github_not_found": true,
    "lcname": "h-signature"
}
        
Elapsed time: 0.11379s