TRSL is a C++ library that implements several sampling schemes behind an (STL-like) iterator interface. The library may be used e.g. in particle filtering or probabilistic inference frameworks. For an overview of the functionalities provided by TRSL, refer to the Products page.
TRSL is distributed under the Boost Software License (BSL). BSL is a GPL-compatible free-software license, very similar to the BSD license and the MIT license; see Boost Software License Background. BSL is also open-source; see Boost Software License 1.0 on the Open Source Initiative website.
TRSL is in a usable state. However, it is likely to grow and change interface in the future.
The latest sources are available through GitHub.
TRSL is meant to be OS Portable. It has been tested on Linux and MacOS X with GCC 4 and LLVM 2.8 (with clang).
The preferred method of communication is currently via GitHub issues.
See the Products page for the complete list of functionalities offered by TRSL.
The central TRSL product is trsl::is_picked_systematic, a predicate functor to use in combination with trsl::persistent_filter_iterator to form a sample iterator. The sample iterator accesses a population of elements through a range defined by a pair of Forward Iterators (begin/end), and provides on-the-fly iteration through a sample of the population.
Let us assume a particle filter implementation, which manages a population of particles (struct Particle { weight; x; y; }
) stored in a container ParticleCollection
. The following bit of code shows an example of how to iterate through a sample of the population after having implemented ParticleCollection::sample_begin(size_t)
and ParticleCollection::sample_end()
using e.g. trsl::is_picked_systematic.
TRSL is developped by Renaud Detry.
TRSL is based on the excellent Boost Iterator Library.
Several concept implementations (e.g. accessors) are inspired from libkdtree++.