{"id":21910377,"url":"https://github.com/nilsfriess/particlefilter","last_synced_at":"2025-03-22T08:18:32.006Z","repository":{"id":109116052,"uuid":"229563148","full_name":"nilsfriess/ParticleFilter","owner":"nilsfriess","description":"Sequential Monte Carlo Particle Filter in C++","archived":false,"fork":false,"pushed_at":"2020-03-05T10:44:42.000Z","size":2399,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-27T08:24:37.078Z","etag":null,"topics":["cpp","monte-carlo","particle-filter"],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nilsfriess.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-12-22T12:19:57.000Z","updated_at":"2021-04-07T13:47:57.000Z","dependencies_parsed_at":null,"dependency_job_id":"2b65aa49-e2d1-403e-b831-215f72cfc658","html_url":"https://github.com/nilsfriess/ParticleFilter","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nilsfriess%2FParticleFilter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nilsfriess%2FParticleFilter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nilsfriess%2FParticleFilter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nilsfriess%2FParticleFilter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nilsfriess","download_url":"https://codeload.github.com/nilsfriess/ParticleFilter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244925158,"owners_count":20532921,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cpp","monte-carlo","particle-filter"],"created_at":"2024-11-28T17:29:54.813Z","updated_at":"2025-03-22T08:18:31.982Z","avatar_url":"https://github.com/nilsfriess.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SMCPF\nThis repository contains a templated header-only dependency-free Particle Filter library written in C++.\n\n## Requirements\nThe library is written in C++17 and thus requires a C++17 compatible compiler, i.e. GCC 7 or newer/ Clang 5 or newer.\nSome parts of the library can be configured to run in parallel by setting a preprocessor constant `PF_USE_PARALLEL` \nbefore including the header [particlefilter.hh](libs/smcpf/include/particlefilter.hh):\n```cpp\n#define PF_USE_PARALLEL\n#include \u003cparticlefilter.hh\u003e\n```\nThis uses the C++ header `\u003cexecution\u003e` which itself depends on [Intel's TBB Library](https://software.intel.com/en-us/tbb).\nIf the constant `PF_USE_PARALLEL` is not set, however, the library itself is completely dependency-free (i.e. depends only on the C++ standard library).\n\n## Running the examples\nThe repository contains three examples located in the folder [apps](apps).\nThey can be easily compiled using [CMake](https://cmake.org/). Example 2 and 3\ndepend on third-party libraries. The first example can be used as-is.\n\n### Example 1 (Simple nonlinear non-Gaussian example)\nThe first [example](apps/example1) does not have any dependencies. To\ncompile and run it, first clone the repository\n```\ngit clone https://github.com/nilsfriess/ParticleFilter.git\n```\nand set up the `CMake` project. In the root directory of the cloned\nrepository, run\n```\ncmake -S . -B build\n```\nto generate the build files in the directory `build`. After that, `cd` into the `build` directory and\ncompile the example by running\n```\nmake example1\n```\nThe executable is saved to the folder `build/apps`. Before executing it, we have to provide a `.csv` file\ncontaining the observations that the particle filter can then use. In the folder [data/example1](data/example1)\na Python script to generate test data is provided. A file that already contains sample observations is also\ngiven there. The program expects the file to be located in the same folder from which it is called, so we copy the \nobservation file [obs_ex1.csv](data/example1/obs_ex1.csv) to the `build` folder \n(assuming we are still inside the `build` folder)\n```\ncp ../data/example1/obs_ex1.csv .\n```\nWe can now run the program\n```\n./apps/example1\n```\nThe program writes its results to a file `output_ex1.csv`. A few exemplar plots of showing the initial data\nand the simulated results can be found in the folder [data/example1](data/example1), e.g.\n\n![Exemplar run using 100 particles](data/example1/example1_plot.png)\n\n### Examples 2 and 3 (Lotka-Volterra equations, Predator-Prey model)\nSetting up and running these examples is similar to above. However, these examples both\ndepend on third-party libraries that both programs get linked against, namely\n* [LAPACK](http://www.netlib.org/lapack/)\n* [Armadillo](http://arma.sourceforge.net/)\n* [Intel TBB](https://software.intel.com/en-us/tbb)\n\nAdditionally, the header-only libraries [StatsLib](https://github.com/kthohr/stats) \nand [GCEM](https://github.com/kthohr/gcem) are required. They are both included in the\n[apps/include](apps/include) folder.\n\nAfter installing the missing dependencies, the programs can be compiled as above by running \n`make example2` and `make example3` inside the `build` directory. Again, an input file containing\nthe observations has to be provided. A sample file is provided as [obs.csv](data/example2/obs.csv).\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnilsfriess%2Fparticlefilter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnilsfriess%2Fparticlefilter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnilsfriess%2Fparticlefilter/lists"}