https://github.com/tbrown122387/pf
PF: a header only template library for fast particle filtering!
https://github.com/tbrown122387/pf
particle-filter statistical-methods statistical-models statistics
Last synced: 23 days ago
JSON representation
PF: a header only template library for fast particle filtering!
- Host: GitHub
- URL: https://github.com/tbrown122387/pf
- Owner: tbrown122387
- License: mit
- Created: 2018-04-19T15:37:23.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2025-02-04T19:57:51.000Z (about 1 year ago)
- Last Synced: 2026-01-29T19:08:40.046Z (30 days ago)
- Topics: particle-filter, statistical-methods, statistical-models, statistics
- Language: HTML
- Homepage:
- Size: 42.9 MB
- Stars: 61
- Watchers: 5
- Forks: 17
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Citation: CITATION.cff
Awesome Lists containing this project
README
# PF: a library for fast particle filtering!
[](https://zenodo.org/badge/latestdoi/130237492)
[](https://doi.org/10.21105/joss.02599)
This is a template library for [particle filtering](https://en.wikipedia.org/wiki/Particle_filter). Templated abstract base classes for different particle filters are provided (e.g. the Bootstrap Filter, the SISR filter, the Auxiliary Particle Filter, the Rao-Blackwellized particle filter), as well as non-abstract (but indeed templated) base classes for closed-form filtering algorithms (e.g. Kalman Filter, Hidden Markov Model filter, etc.).
Once you have a certain model in mind, all you have to do is make it into a class that inherits from the filter you want to use.
## Dependencies
This code makes use of the following libraries:
- [Eigen v3.3](http://eigen.tuxfamily.org/)
- [Boost v1.65.1](https://www.boost.org/)
- [Catch2](https://github.com/catchorg/Catch2)
Also, your compiler must enable C++17.
## Installation
### Option 1: Install with `CMake`
`git clone` this Github repostory, `cd` into the directory where everything is saved, then run the following commands:
mkdir build && cd build/
cmake .. -DCMAKE_INSTALL_PREFIX:PATH=/usr/local
sudo cmake --build . --config Release --target install --parallel
You may subsitute another directory for `/usr/local`, if you wish. This will also build unit tests that can be run with the following command (assuming you're still in `build/`):
./test/pf_test
Note: for this to method work, you will need to install Catch2 "system wide" so that its `*.cmake` files are installed as well. To do this, [click here](https://github.com/catchorg/Catch2/blob/master/docs/cmake-integration.md#installing-catch2-from-git-repository).
### Option 2: Drag-and-drop `.h` files
This is a header-only library, so there will be no extra building necessary. If you just want to copy the desired header files from `include/pf` into your own project, and build that project by itself, that's totally fine. There is no linking necessary, either. If you go this route, though, make sure to compile with C++17 enabled. Note, also, that this code all makes use of [Eigen v3.3](http://eigen.tuxfamily.org/) and [Boost v1.65.1](https://www.boost.org/). Unit tests use the [Catch2](https://github.com/catchorg/Catch2) library.
## Examples
Don't know how to use this? No problem. Check out the [`examples`](https://github.com/tbrown122387/pf/tree/master/examples) sub-directory. This is a stand-alone cmake project, so you can just copy this sub-directory anywhere you like, and start editing.
For example, copy to `Desktop` and have at it:
cp -r ~/pf/examples/ ~/Desktop/
cd Desktop/examples/
mkdir build && cd build
cmake ..
make
If there are no error messages, you will have an executable named `pf_example` in that same directory. Running it without command line arguments will prompt you for arguments and tell you how it can be used.
## Contributing
Want to contribute to this project? Great! Click [here](CONTRIBUTING.md) for details on how to do that. We also have an "ideas list" you can check out [here](ideas_list.md).
## Paper
A full-length tutorial paper is available [here,](https://arxiv.org/abs/2001.10451) and a shorter introduction paper is available [here.](https://joss.theoj.org/papers/10.21105/joss.02599)
## Citation
Click the "DOI" link above. Or, if you're impatient, click ['here'](https://zenodo.org/record/2633289/export/hx) for a Bibtex citation.