semvec/pypi-packages huggingface dataset:
grpfpy 0.1.22
the Global complex Root and Pole Finding (GRPF) algorithm.

# grpfc: Global complex Roots and Poles Finding in C++
[![GitHub actions](https://img.shields.io/github/actions/workflow/status/allegro0132/grpfc/python-publish.yml)](https://github.com/allegro0132/grpfc/actions/workflows/python-publish.yml)
[![PyPI](https://img.shields.io/pypi/v/grpfpy.svg?logo=pypi)](https://pypi.org/project/grpfpy/)
[![License](https://img.shields.io/badge/license-MIT%20-blue.svg?logo=mit)](https://github.com/allegro0132/grpfc/blob/main/LICENSE)
## Description

`grpfc` attempts to **find all the zeros and poles of a complex valued function with complex arguments in a fixed region**.
These types of problems are frequently encountered in electromagnetics, but the algorithm can also be used for similar problems in e.g. optics, acoustics, etc.

The GRPF algorithm first samples the function on a triangular mesh through Delaunay triangulation.
Candidate regions to search for roots and poles are determined and the discretized [Cauchy's argument principle](https://en.wikipedia.org/wiki/Argument_principle) is applied _without needing the derivative of the function or integration over the contour_.
To improve the accuracy of the results, a self-adaptive mesh refinement occurs inside the identified candidate regions.

## grpfpy: Global complex Roots and Poles Finding binding in Python

We also provide `grpfpy`, a Python binding for `grpfc`, which is a convenient and high-performance solution for your research. A set of pre-compiled wheels could be installed directly via
```bash
  pip install grpfpy
```
Additionally, if your platform has not been supported, you can clone the sources and build them yourself using pip or cmake:
```bash
  pip install .
```

## Installation
- Pull source codes
```bash
  git clone --recurse-submodules git@github.com:allegro0132/grpfc.git
```
### Linux

- Install gcc complier
```bash
  apt install build-essential
```

### MacOS

- Install clang compiler
```bash
  brew install cmake llvm
```

### Windows

- Install MinGW gcc compiler
```bash
  choco install mingw
```

### Common steps

- Prepare building directory
```bash
  mkdir build&&cd build
```

- Prepare compile flags using cmake
```bash
  cmake ..
```

For windows user, you should type it instead:
```bash
  cmake -G "MinGW Makefiles" ..
```

- Compile the library
```bash
  make
```

- Run the Roots and Poles solver
```bash
  ./main
```