Namespaces | Variables
beluga::views Namespace Reference

Namespaces

 detail
 

Variables

template<std::size_t N>
constexpr auto elements
 
constexpr detail::random_intersperse_fn random_intersperse
 
constexpr ranges::views::view_closure< detail::sample_fnsample
 
constexpr auto states = ranges::views::transform(beluga::state)
 
constexpr detail::take_evenly_fn take_evenly
 
constexpr detail::take_while_kld_fn take_while_kld
 
constexpr auto weights = ranges::views::transform(beluga::weight)
 
constexpr detail::zip_fn zip
 Given N ranges, return a new range where the Mth element is a tuple of the Mth elements of all N ranges. More...
 

Variable Documentation

◆ elements

template<std::size_t N>
constexpr auto beluga::views::elements
inlineconstexpr
Initial value:
= ranges::views::transform(
[](auto&& tuple) -> decltype(auto) { return std::get<N>(std::forward<decltype(tuple)>(tuple)); })

Range adaptor object that will apply std::get<N> to each value in the range lazily.

Template Parameters
NElement to get from the array or tuple.
Parameters
tupleTuple or array instance, with at least N + 1 elements.

Definition at line 36 of file elements.hpp.

◆ random_intersperse

constexpr detail::random_intersperse_fn beluga::views::random_intersperse
inlineconstexpr

Range adaptor object that will insert values from a generator function between contiguous elements from the source based on a given probability.

Definition at line 190 of file random_intersperse.hpp.

◆ sample

constexpr ranges::views::view_closure<detail::sample_fn> beluga::views::sample
inlineconstexpr

Range adaptor object that will randomly sample with replacement from an input range. Unlike std::views::sample, this does not require a size parameter and the samples will be taken from the population with replacement, making the sample values independent. To use this, the input range must model the random_access_range and sized_range concepts.

This view implements multinomial resampling for a given range of particles. The core idea is to draw random indices / iterators to the input particle range from a multinomial distribution parameterized after particle weights (and assumed uniform for non-weighted particle ranges).

This view can also be used to convert any random distribution (a callable that takes a URNG as an input argument) into an infinite view that generates values from that distribution.

This view is not cheap to copy, so care must be taken when moving it around. Range-v3 does not support move-only views at the time of this implementation.

Definition at line 240 of file sample.hpp.

◆ states

constexpr auto beluga::views::states = ranges::views::transform(beluga::state)
inlineconstexpr

Range adaptor object that will obtain a reference to the state of each particle in the input range lazily.

Definition at line 30 of file particles.hpp.

◆ take_evenly

constexpr detail::take_evenly_fn beluga::views::take_evenly
inlineconstexpr

Range adaptor object that will take elements evenly spaced over a range. Given a source range and an integral count, returns a range consisting of count elements evenly spaced over the source range. If count or the range size are zero, it returns an empty range. If count is greater than the range size, it returns all the elements. The first and last elements of the range are always included.

Definition at line 102 of file take_evenly.hpp.

◆ take_while_kld

constexpr detail::take_while_kld_fn beluga::views::take_while_kld
inlineconstexpr

Range adaptor object that will take elements from a range while the KLD condition is statisfied. The input range should be randomly generated from an existing particle set. This adaptor will return elements until the minimum number of samples based on a Kullback-Leibler distance epsilon is satisfied.

See KLD-Sampling: Adaptive Particle Filters [fox2001adaptivekldsampling].

Definition at line 170 of file take_while_kld.hpp.

◆ weights

constexpr auto beluga::views::weights = ranges::views::transform(beluga::weight)
inlineconstexpr

Range adaptor object that will obtain a reference to the weight of each particle in the input range lazily.

Definition at line 34 of file particles.hpp.

◆ zip

constexpr detail::zip_fn beluga::views::zip
inlineconstexpr

Given N ranges, return a new range where the Mth element is a tuple of the Mth elements of all N ranges.

Unlike ranges::views::zip, iterators always dereference into tuples, not pairs. Other than that, they are both equivalent views.

Definition at line 74 of file zip.hpp.



beluga
Author(s):
autogenerated on Tue Jul 16 2024 02:59:54