Metadata-Version: 2.1
Name: curvesimplify
Version: 0.1.0
Summary: Polyline simplifying package
Author-email: Jisoo Song <jeesoo9595@snu.ac.kr>
License: Copyright 2024, Jisoo Song
        
        Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
        
        1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
        
        2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
        
        3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
        
        THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Project-URL: homepage, https://github.com/JSS95/curvesimplify
Project-URL: source, https://github.com/JSS95/curvesimplify
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: BSD License
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: Scientific/Engineering :: Mathematics
Classifier: Operating System :: OS Independent
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy
Requires-Dist: scipy
Requires-Dist: numba
Requires-Dist: curvesimilarities>=0.4.0a1
Provides-Extra: test
Requires-Dist: pytest; extra == "test"
Provides-Extra: doc
Requires-Dist: sphinx; extra == "doc"
Requires-Dist: numpydoc; extra == "doc"
Requires-Dist: pydata_sphinx_theme; extra == "doc"
Requires-Dist: matplotlib; extra == "doc"
Provides-Extra: dev
Requires-Dist: flake8; extra == "dev"
Requires-Dist: flake8-docstrings; extra == "dev"
Requires-Dist: black; extra == "dev"
Requires-Dist: isort; extra == "dev"
Requires-Dist: docformatter; extra == "dev"
Requires-Dist: doc8; extra == "dev"
Requires-Dist: curvesimplify[doc,test]; extra == "dev"

# CurveSimplify

[![License](https://img.shields.io/github/license/JSS95/curvesimplify)](https://github.com/JSS95/curvesimplify/blob/master/LICENSE)
[![CI](https://github.com/JSS95/curvesimplify/actions/workflows/ci.yml/badge.svg)](https://github.com/JSS95/curvesimplify/actions/workflows/ci.yml)
[![CD](https://github.com/JSS95/curvesimplify/actions/workflows/cd.yml/badge.svg)](https://github.com/JSS95/curvesimplify/actions/workflows/cd.yml)
[![Docs](https://readthedocs.org/projects/curvesimplify/badge/?version=latest)](https://curvesimplify.readthedocs.io/en/latest/?badge=latest)
[![Supported Python Versions](https://img.shields.io/pypi/pyversions/curvesimplify.svg)](https://pypi.python.org/pypi/curvesimplify/)
[![PyPI Version](https://img.shields.io/pypi/v/curvesimplify.svg)](https://pypi.python.org/pypi/curvesimplify/)

![title](https://curvesimplify.readthedocs.io/en/latest/_images/plot-header.png)

A Python package for polygonal curve simplification.

List of supported algorithms:
- Imai-Iri algorithm (`curvesimplify.imaiiri`)
- Agarwal's algorithm (`curvesimplify.agarwal`)

## Usage

```python
>>> import numpy as np
>>> from curvesimplify.agarwal import min_err
>>> x = np.linspace(0, 5, 50)
>>> f = np.exp(-x) * np.cos(2 * np.pi * x)
>>> curve = np.column_stack([x, f])
>>> simp, err = min_err(curve, 10)
>>> len(simp)  # at most 10
10
```

## Installation

CurveSimplify can be installed using `pip`.

```
$ pip install curvesimplify
```

## Documentation

CurveSimplify is documented with [Sphinx](https://pypi.org/project/Sphinx/).
The manual can be found on Read the Docs:

> https://curvesimplify.readthedocs.io/

If you want to build the document yourself, get the source code and install with `[doc]` dependency.
Then, go to `doc` directory and build the document:

```
$ pip install .[doc]
$ cd doc
$ make html
```

Document will be generated in `build/html` directory. Open `index.html` to see the central page.
