62template <
typename Space_,
typename Split,
typename Particles>
67 using Scalar =
typename Particles::Scalar;
68 using SpaceType = Space_;
69 using PathType =
typename Split::PathType;
70 using PinnedSpace =
typename Split::PinnedSpace;
71 using RestSpace =
typename Split::RestSpace;
72 static constexpr bool HasKernels =
false;
75 ParticlePoints(Space_
const & space, Split
const & split, Particles
const & particles)
78 , m_particles{particles}
82 [[nodiscard]] Space_
const &
89 [[nodiscard]] RestSpace
const &
92 return m_split.restSpace();
96 [[nodiscard]] BlockRows
99 return m_split.pinnedRows();
103 [[nodiscard]]
auto const &
106 return m_split.restIndices();
110 [[nodiscard]] BlockRows
111 pinnedDifferenceRows()
const
113 return m_split.pinnedDifferenceRows();
117 [[nodiscard]]
auto const &
118 restDifferenceIndices()
const
120 return m_split.restDifferenceIndices();
124 [[nodiscard]] Eigen::Index
127 return m_particles.size();
132 center(Eigen::Index i)
const
134 return m_particles.state(i);
139 Space_
const & m_space;
140 Split
const & m_split;
141 Particles
const & m_particles;
193 static_assert(internal::CovarianceForm<Covariance_>,
"the covariance is SharedCovariance or PerPointCovariance");
194 static constexpr bool Shared = std::is_same_v<Covariance_, SharedCovariance>;
195 using Split = internal::BlockSplit<Space_, Path_>;
198 static constexpr bool IsHybrid = internal::isGaussianHybrid<Params<Component_>>;
205 "a particle holds a Gaussian or a hybrid of Gaussians"
208 std::is_same_v<typename Params<Component_>::SpaceType,
typename Split::RestSpace>
209 && std::is_same_v<typename Params<Component_>::Scalar, Scalar_>,
210 "a particle's distribution is over the rest of the state, in the state's scalar"
213 !(IsHybrid && Shared),
214 "mixing a particle's modes gives each particle covariances of its own, so a hybrid per particle needs "
241 : m_space{std::move(
space)}
248 EMRYS_FILTER_ASSERT(
conditional.space() ==
restSpace() &&
"the Gaussian must be over the rest of the state");
256 template <
typename MeansDerived>
260 Eigen::MatrixBase<MeansDerived>
const & means,
265 : m_space{std::move(
space)}
278 &&
"give one mean over the rest of the state per particle"
280 if constexpr (Shared)
282 m_conditionals.means() = means;
286 for (Eigen::Index i = 1; i <
size(); ++i)
288 m_conditionals.conditional(i).setMean(means.col(i));
300 EMRYS_FILTER_ASSERT(Eigen::Index(conditionals.size()) ==
size() &&
"give one Gaussian per particle");
301 for (Eigen::Index i = 0; i <
size(); ++i)
305 &&
"the Gaussians must be over the rest of the state"
307 m_conditionals.conditional(i) = conditionals[std::size_t(i)];
312 [[nodiscard]] Space_
const &
322 return m_split.pinnedSpace();
329 return m_split.restSpace();
336 return m_split.pinnedRows();
340 [[nodiscard]]
auto const &
343 return m_split.restIndices();
350 return m_split.pinnedDifferenceRows();
354 [[nodiscard]]
auto const &
357 return m_split.restDifferenceIndices();
361 [[nodiscard]] Eigen::Index
364 return m_particles.size();
371 return m_particles.get_allocator();
380 m_stamp.touchShape();
381 m_particles.setCapacity(capacity);
382 m_conditionals.reserve(capacity);
383 m_kept.reserve(std::size_t(capacity));
397 return m_particles.state(i);
404 return m_particles.logWeights();
411 return m_particles.logWeight(i);
415 [[nodiscard]] std::expected<Scalar, WeightError>
418 return m_particles.logTotalWeight();
422 template <ExecutionPolicy P>
423 [[nodiscard]] std::expected<Scalar, WeightError>
426 return m_particles.logTotalWeight(std::forward<P>(policy));
430 [[nodiscard]] std::expected<Scalar, WeightError>
433 return m_particles.ess();
437 template <ExecutionPolicy P>
438 [[nodiscard]] std::expected<Scalar, WeightError>
441 return m_particles.ess(std::forward<P>(policy));
445 [[nodiscard]] Eigen::Index
448 Eigen::Index best = 0;
454 [[nodiscard]]
decltype(
auto)
457 EMRYS_FILTER_ASSERT(i >= 0 && i <
size() &&
"the particle is out of range");
458 return m_conditionals.conditional(i);
469 return internal::summedModes(m_conditionals,
logWeights());
477 return m_conditionals.sharedCovariance();
487 [[nodiscard]] std::expected<void, NumericError>
490 if (
auto const total = m_particles.logTotalWeight(); !total)
492 return std::unexpected{total.error()};
494 return m_conditionals.factorize();
501 [[nodiscard]] std::expected<DensityType, NumericError>
506 return std::unexpected{result.error()};
508 return DensityType{*
this};
521 template <std::uniform_random_bit_generator G, typename R =
resamplers::Systematic>
524 resample(G & rng, Eigen::Index newSize, R const & resampler = {})
530 template <std::uniform_random_bit_generator G,
typename R = resamplers::Systematic>
531 requires Resampler<R, Scalar, G>
532 [[nodiscard]] std::expected<void, WeightError>
541 template <ExecutionPolicy P, std::uniform_random_bit_generator G,
typename R = resamplers::Systematic>
542 requires Resampler<R, Scalar, G>
543 [[nodiscard]] std::expected<void, WeightError>
544 resample(P && policy, G & rng, Eigen::Index newSize, R
const & resampler = {})
546 auto const resampled = m_particles.
resample(policy, rng, newSize, resampler);
551 m_stamp.touchShape();
552 m_conditionals.select(std::forward<P>(policy), m_particles.
ancestors());
557 template <ExecutionPolicy P, std::uniform_random_bit_generator G,
typename R = resamplers::Systematic>
558 requires Resampler<R, Scalar, G>
559 [[nodiscard]] std::expected<void, WeightError>
560 resample(P && policy, G & rng, R
const & resampler = {})
562 return resample(std::forward<P>(policy), rng,
size(), resampler);
571 [[nodiscard]] std::expected<Scalar, WeightError>
574 return pruneWith(internal::PruneBelowRule<Scalar>{logThreshold});
584 [[nodiscard]] std::expected<Scalar, WeightError>
587 return pruneWith(internal::PruneTailRule<Scalar>{logFraction});
596 [[nodiscard]] std::expected<Scalar, WeightError>
599 return pruneWith(internal::PruneToSizeRule{maxSize});
605 template <
typename Derived>
609 EMRYS_FILTER_ASSERT(states.cols() ==
size() &&
"give one value per particle");
610 m_stamp.touchValues();
611 m_particles.setStates(states);
617 template <Space,
typename,
typename,
typename,
typename, RealScalar,
typename,
typename>
624 friend class internal::ValuesCheck;
627 using ConditionalsType = internal::Conditionals<RestSpace, Covariance_, Scalar_, Allocator_, ConditionalType>;
630 using IndexAllocator = internal::ReBound<Allocator_, Eigen::Index>;
635 template <
typename Rule>
636 [[nodiscard]] std::expected<Scalar, WeightError>
637 pruneWith(Rule
const & rule)
640 auto const removed = internal::ParticleSetAccess::prune(m_particles, rule, [&](Eigen::Index i) {
645 m_stamp.touchShape();
646 m_conditionals.keep(std::span<Eigen::Index const>{m_kept.data(), m_kept.size()});
652 [[nodiscard]] internal::ParticlePoints<Space_, Split, ParticlesType>
655 return {m_space, m_split, m_particles};
663 [[nodiscard]] GaussianParams<Space_, Scalar>
664 collapseParticles()
const
666 if constexpr (IsHybrid)
672 return internal::collapseGivenPoints(points(), m_conditionals,
logWeights());
680 EMRYS_FILTER_ASSERT(!m_particles.empty() &&
"a Rao-Blackwellized state needs a particle");
681 EMRYS_FILTER_ASSERT(m_particles.valueDimension() ==
pinnedRows().
size &&
"the particles do not fit the block");
694 template <ExecutionPolicy P,
typename Derived>
695 [[nodiscard]] std::pair<Scalar, bool>
696 reweight(P && policy, Eigen::ArrayBase<Derived>
const &
logLikelihoods, ConditionalsType & posterior)
698 return reweightThen(std::forward<P>(policy),
logLikelihoods, [&] {
699 m_conditionals.swap(posterior);
709 template <ExecutionPolicy P,
typename Derived>
710 [[nodiscard]] std::pair<Scalar, bool>
711 reweight(P && policy, Eigen::ArrayBase<Derived>
const &
logLikelihoods)
713 return reweightThen(std::forward<P>(policy),
logLikelihoods, [] {});
719 template <ExecutionPolicy P,
typename Derived,
typename Place>
720 [[nodiscard]] std::pair<Scalar, bool>
721 reweightThen(P && policy, Eigen::ArrayBase<Derived>
const &
logLikelihoods, Place
const & place)
723 EMRYS_FILTER_ASSERT(
logLikelihoods.size() ==
size() &&
"give one log-likelihood per particle");
724 auto const logTotal = m_particles.logTotalWeight(policy);
725 EMRYS_FILTER_ASSERT(logTotal &&
"the particles' weights must be valid");
728 return {Eigen::NumTraits<Scalar>::quiet_NaN(),
false};
733 EMRYS_FILTER_ASSERT(!
isNaN(
logLikelihood) &&
"the measurement's log-likelihood must not be NaN");
738 m_stamp.touchShape();
747 internal::Buffer<Eigen::Index, Allocator_> m_kept;
749 ConditionalsType m_conditionals;
750 internal::Stamp m_stamp;
774 typename Covariance_,
778class ParticleGaussian
796 [[nodiscard]] Space_
const &
799 return source().space();
803 [[nodiscard]] Eigen::Index
806 return source().size();
813 return source().particles();
817 [[nodiscard]]
decltype(
auto)
820 return source().conditional(i);
830 return source().collapseParticles();
855 return m_check.get();
858 internal::ValuesCheck<ParamsType> m_check;
866template <
typename P, Space S,
typename Scalar,
typename Allocator,
typename Covariance = SharedCovariance>
870 ParticleSet<
typename internal::BlockSplit<S, P>::PinnedSpace, Scalar, Allocator> particles,
871 GaussianParams<
typename internal::BlockSplit<S, P>::RestSpace, Scalar>
const & conditional,
872 Covariance covariance = {}
875 return ParticleGaussianParams<S, P, Covariance, Scalar, Allocator>{
877 std::move(particles),
895 typename HybridAllocator>
899 ParticleSet<
typename internal::BlockSplit<S, P>::PinnedSpace, Scalar, Allocator> particles,
920 typename Covariance = SharedCovariance,
923 std::uniform_random_bit_generator G,
931 Allocator
const & allocator = {}
937 EMRYS_FILTER_ASSERT(count > 0 &&
"draw at least one particle");
938 auto const split = internal::BlockSplit<S, P>{joint.
space()};
939 auto const conditioning = internal::pinnedConditioning(split, joint.
covarianceLower());
940 PinnedNormals
const z = internal::standardNormal<PinnedNormals>(split.pinnedDifferenceRows().size, count, rng);
941 auto pinned = PinnedSamples{split.pinnedRows().size, count};
942 auto means =
typename Result::MeansType{split.restIndices().size(), count};
943 for (Eigen::Index i = 0; i < count; ++i)
945 internal::drawPinned(split, conditioning, joint.
mean(), z.col(i), pinned.col(i), means.col(i));
947 auto particles =
typename Result::ParticlesType{split.pinnedSpace(), pinned, allocator};
948 return Result{joint.
space(), std::move(particles), means, conditioning.cov, Covariance{}};
953#ifndef EMRYS_FILTER_NO_IO
968 typename Covariance_,
974 std::ostream & stream,
975 ParticleGaussianParams<Space_, Path_, Covariance_, Scalar_, Allocator_, Component_>
const & state,
980 stream << indent <<
"Rao-Blackwellized particle set of ";
981 printCount(stream, state.size(),
"particle");
983 auto const ess = state.ess();
984 auto const density = state.toDensity();
987 stream <<
", effective sample size " << *ess;
991 printMoments(stream, indent.deeper(), density->moments());
996 describe(stream, density.error(), indent.deeper());
What the Rao-Blackwellized states share (decisions.md [rao-blackwellized-core], [rb-particle-filter])...
Execution policies (decisions.md [execution-policies]): execution::sequential, the ExecutionPolicy co...
The Gaussian: its parameters GaussianParams, the Gaussian that evaluates the density,...
The hybrid state of a discrete mode and a component per mode (decisions.md [imm], [component-first]):...
The macros every header includes first.
Mathematical constants and scalar functions that work in every scalar type the library accepts,...
Moments: the mean and covariance that a Gaussian carries and that a mixture or a sample set is moment...
Params and Density: the traits that pair a distribution's parameters with its density,...
The particle set: ParticleSet, the weighted samples, with resampling, upkeep of weights and particles...
Printing: operator<< and std::formatter for every distribution, every filter (which prints its name a...
The resamplers: function objects that draw ancestors in proportion to weights, which ParticleSet::res...
SampleSet: a matrix whose columns are samples in a space, which the samplers return and the unscented...
Drawing samples: SamplesWithLogDensity and SampleWithLogDensity, the Gaussian draws drawSamples(),...
The Space concept and what every continuous space shares (decisions.md [sizes-and-dimensions]): the t...
What parameters and their views share (decisions.md [view-stamp], [params-and-density]): Stamp,...
Tag paths and the index utilities (decisions.md [tag-addressing], [index-names]): TagPath and TagPath...
Log-weights: the WeightError a normalization can fail with (NumericError.h), and the streaming log-su...
A Gaussian distribution: a mean and covariance in a space.
Definition Gaussian.h:259
MatrixType const & covarianceLower() const
Definition Gaussian.h:543
MomentsType const & moments() const
Definition Gaussian.h:526
VectorType const & mean() const
Definition Gaussian.h:533
Space_ const & space() const
Definition Gaussian.h:519
The density of a Gaussian whose covariance has been factorized: a read-only view.
Definition Gaussian.h:1011
The parameters of a hybrid state: a discrete mode, and a component conditioned on each mode.
Definition Hybrid.h:86
The density of a hybrid state, a checked view of its HybridParams (decisions.md [params-and-density],...
Definition Hybrid.h:528
First and second moments (mean and covariance) of a distribution.
Definition Moments.h:55
DifferenceMatrix< Space_, Space_, Scalar > MatrixType
a matrix over differences, such as the covariance
Definition Moments.h:76
The parameters of a Rao-Blackwellized particle filter's state: weighted particles for one block of th...
Definition ParticleGaussian.h:192
auto const & restDifferenceIndices() const
Definition ParticleGaussian.h:355
ParticleGaussianParams(Space_ space, ParticlesType particles, std::span< ConditionalType const > conditionals)
particles of the block in space, particle i with the Gaussian, or the hybrid, conditionals[i] over th...
Definition ParticleGaussian.h:296
std::expected< DensityType, NumericError > toDensity() const &
Checks the state (factorize()) and views it.
Definition ParticleGaussian.h:502
auto particle(Eigen::Index i) const
Definition ParticleGaussian.h:395
ParticleGaussianParams(Space_ space, ParticlesType particles, Eigen::MatrixBase< MeansDerived > const &means, typename Moments< RestSpace, Scalar_ >::MatrixType const &cov, Covariance_={})
particles of the block in space, particle i with the mean means.col(i) over the rest and the covarian...
Definition ParticleGaussian.h:257
SampleSet< RestSpace, Scalar_ > MeansType
means over the rest, one per column
Definition ParticleGaussian.h:231
std::expected< Scalar, WeightError > logTotalWeight() const
Definition ParticleGaussian.h:416
std::expected< Scalar, WeightError > pruneTail(Scalar logFraction)
Removes the lightest particles, with their Gaussians, as many as can be while their combined normaliz...
Definition ParticleGaussian.h:585
std::expected< void, WeightError > resample(G &rng, R const &resampler={})
Resamples to the current size().
Definition ParticleGaussian.h:533
Eigen::Index size() const
Definition ParticleGaussian.h:362
Covariance_ CovarianceType
SharedCovariance or PerPointCovariance.
Definition ParticleGaussian.h:225
RestSpace const & restSpace() const
Definition ParticleGaussian.h:327
friend class RbParticleFilter
Definition ParticleGaussian.h:618
ParticleGaussian< Space_, Path_, Covariance_, Scalar_, Allocator_, Component_ > DensityType
what toDensity() returns
Definition ParticleGaussian.h:232
BlockRows pinnedRows() const
Definition ParticleGaussian.h:334
std::expected< Scalar, WeightError > pruneBelow(Scalar logThreshold)
Removes every particle whose normalized log-weight is below logThreshold, with its Gaussian,...
Definition ParticleGaussian.h:572
typename ParticlesType::WeightArrayType WeightArrayType
one entry per particle
Definition ParticleGaussian.h:229
Allocator_ allocator_type
the allocator, re-bound per buffer
Definition ParticleGaussian.h:227
Params< Component_ > ConditionalType
a particle's distribution over the rest: a Gaussian or a hybrid
Definition ParticleGaussian.h:226
std::expected< Scalar, WeightError > ess() const
Definition ParticleGaussian.h:431
decltype(auto) conditional(Eigen::Index i) const
Definition ParticleGaussian.h:455
ParticlesType const & particles() const
Definition ParticleGaussian.h:388
allocator_type get_allocator() const
Definition ParticleGaussian.h:369
BlockRows pinnedDifferenceRows() const
Definition ParticleGaussian.h:348
PinnedSpace const & pinnedSpace() const
Definition ParticleGaussian.h:320
Space_ SpaceType
the whole state space
Definition ParticleGaussian.h:221
typename Split::PinnedSpace PinnedSpace
the sampled block's space
Definition ParticleGaussian.h:223
Scalar logWeight(Eigen::Index i) const
Definition ParticleGaussian.h:409
static constexpr bool IsParams
Definition ParticleGaussian.h:235
void toDensity() const &&=delete
A density of a temporary would outlive it.
Scalar_ Scalar
the scalar type
Definition ParticleGaussian.h:220
std::expected< void, WeightError > resample(P &&policy, G &rng, Eigen::Index newSize, R const &resampler={})
resample() under policy, as ParticleSet::resample() runs under one, with the ancestors' Gaussians gat...
Definition ParticleGaussian.h:544
typename Split::RestSpace RestSpace
the rest's space, in order
Definition ParticleGaussian.h:224
std::expected< Scalar, WeightError > logTotalWeight(P &&policy) const
logTotalWeight() under policy, a reduction over the particles (see Execution policies).
Definition ParticleGaussian.h:424
std::expected< void, WeightError > resample(G &rng, Eigen::Index newSize, R const &resampler={})
Definition ParticleGaussian.h:524
Space_ const & space() const
Definition ParticleGaussian.h:313
std::expected< void, NumericError > factorize() const
Checks the weights and factorizes each particle's Gaussian, the one they share once,...
Definition ParticleGaussian.h:488
LogWeightsType logWeights() const
Definition ParticleGaussian.h:402
typename ParticlesType::LogWeightsType LogWeightsType
the particles' log-weights map
Definition ParticleGaussian.h:230
auto const & restIndices() const
Definition ParticleGaussian.h:341
std::expected< Scalar, WeightError > pruneToSize(Eigen::Index maxSize)
Removes the lightest particles, with their Gaussians, until at most maxSize, at least one,...
Definition ParticleGaussian.h:597
Eigen::Index mostProbable() const
Definition ParticleGaussian.h:446
Path_ PathType
the path naming the sampled block
Definition ParticleGaussian.h:222
auto modes() const
Definition ParticleGaussian.h:466
void setCapacity(Eigen::Index capacity)
Reserves room for capacity particles and their Gaussians, and makes holding more a precondition viola...
Definition ParticleGaussian.h:378
ParticleSet< PinnedSpace, Scalar_, Allocator_ > ParticlesType
the particles of the block
Definition ParticleGaussian.h:228
ParticleGaussianParams(Space_ space, ParticlesType particles, ConditionalType const &conditional, Covariance_={})
particles of the block in space, each with conditional as its Gaussian, or its hybrid,...
Definition ParticleGaussian.h:240
std::expected< void, WeightError > resample(P &&policy, G &rng, R const &resampler={})
resample() to the current size() under policy.
Definition ParticleGaussian.h:560
Moments< RestSpace, Scalar_ >::MatrixType const & sharedCovariance() const
Definition ParticleGaussian.h:474
void setParticleStates(Eigen::MatrixBase< Derived > const &states)
Replaces the particles' values of the sampled block with the columns of states, one per particle,...
Definition ParticleGaussian.h:607
std::expected< Scalar, WeightError > ess(P &&policy) const
ess() under policy, reductions over the particles (see Execution policies).
Definition ParticleGaussian.h:439
The density of a Rao-Blackwellized particle filter's state, a checked view of its ParticleGaussianPar...
Definition ParticleGaussian.h:779
Space_ const & space() const
Definition ParticleGaussian.h:797
Scalar_ Scalar
the scalar type
Definition ParticleGaussian.h:784
typename ParamsType::RestSpace RestSpace
the rest's space, in order
Definition ParticleGaussian.h:787
MomentsType moments() const
Definition ParticleGaussian.h:835
static constexpr bool IsParams
a view: it checks its parameters
Definition ParticleGaussian.h:793
GaussianParams< Space_, Scalar_ > collapsed() const
Definition ParticleGaussian.h:828
ParticlesType const & particles() const
Definition ParticleGaussian.h:811
typename ParamsType::ConditionalType ConditionalType
a particle's distribution over the rest
Definition ParticleGaussian.h:788
Allocator_ allocator_type
the parameters' allocator
Definition ParticleGaussian.h:791
decltype(auto) conditional(Eigen::Index i) const
Definition ParticleGaussian.h:818
ParticleGaussianParams< Space_, Path_, Covariance_, Scalar_, Allocator_, Component_ > ParamsType
the parameters
Definition ParticleGaussian.h:782
typename ParamsType::PinnedSpace PinnedSpace
the sampled block's space
Definition ParticleGaussian.h:786
Space_ SpaceType
the whole state space
Definition ParticleGaussian.h:785
Eigen::Index size() const
Definition ParticleGaussian.h:804
Moments< Space_, Scalar_ > MomentsType
a mean and covariance of the whole state
Definition ParticleGaussian.h:790
typename ParamsType::ParticlesType ParticlesType
the particles of the block
Definition ParticleGaussian.h:789
A set of weighted samples: the empirical distribution.
Definition ParticleSet.h:279
Eigen::Map< WeightArrayType const > LogWeightsType
Definition ParticleSet.h:301
std::expected< void, WeightError > resample(G &rng, Index newSize, R const &resampler={})
Replaces the particles with newSize draws chosen by resampler in proportion to their weights,...
Definition ParticleSet.h:1236
Eigen::Array< Scalar, Eigen::Dynamic, 1 > WeightArrayType
Definition ParticleSet.h:298
std::span< Index const > ancestors() const
Definition ParticleSet.h:1321
A Rao-Blackwellized particle filter: particles for one block of the state, each carrying a Kalman fil...
Definition RbParticleFilter.h:319
The distribution that a container of several holds one of per element (decisions.md [component-first]...
Definition Component.h:299
A type usable as the scalar of a distribution: a real number type such as float, double,...
Definition Math.h:80
Requirements on a resampler for scalar type Scalar and random generator G.
Definition Resampling.h:61
A type usable as the space of a distribution.
Definition Space.h:186
std::allocator< std::byte > DefaultAllocator
The allocator a type with a run-time count uses unless given one.
Definition Allocation.h:47
Scalar logSumExp(P &&policy, Eigen::Index count, LogAt const &logAt)
Definition Weights.h:151
bool isNaN(T const &x)
Definition Math.h:329
NumericError WeightError
Reasons a collection of log-weights cannot be normalized: Empty, ZeroSum, or NonFinite of NumericErro...
Definition NumericError.h:53
Eigen::Matrix< Scalar, valueDimensionAtCompileTime< Space >, Eigen::Dynamic,(maxValueDimensionAtCompileTime< Space >==1 ? Eigen::RowMajor :Eigen::ColMajor), maxValueDimensionAtCompileTime< Space >, Eigen::Dynamic > SampleSet
A matrix whose columns are samples in Space (see Spaces), with the space's size and storage bound.
Definition SampleSet.h:33
auto particleGaussian(S space, ParticleSet< typename internal::BlockSplit< S, P >::PinnedSpace, Scalar, Allocator > particles, GaussianParams< typename internal::BlockSplit< S, P >::RestSpace, Scalar > const &conditional, Covariance covariance={})
Definition ParticleGaussian.h:868
auto drawParticleGaussian(GaussianParams< S, Scalar > const &joint, Eigen::Index count, G &rng, Covariance={}, Allocator const &allocator={})
Definition ParticleGaussian.h:926
typename ParamsOf< D >::type Params
The parameters of the density D: GaussianParams for a Gaussian, and D itself for a distribution whose...
Definition Params.h:42
constexpr Sequential sequential
The default execution policy: plain loops on the calling thread, in index order (Sequential).
Definition Execution.h:128
Derived::Scalar logLikelihood(M const &measurement, Space const &space, Eigen::MatrixBase< Derived > const &x)
Definition Likelihood.h:433
Eigen::Array< typename Derived::Scalar, Eigen::Dynamic, 1 > logLikelihoods(M const &measurement, Space const &space, Eigen::MatrixBase< Derived > const &states)
Definition Likelihood.h:408
Eigen::Index valueDimension(S const &space)
Definition Space.h:272
Eigen::Index differenceDimension(S const &space)
Definition Space.h:284
The resamplers, each made by its factory (decisions.md [policy-factories]): multinomial(),...
Definition Resampling.h:210
Rows of a contiguous block of a space.
Definition TagPath.h:825
A covariance per point.
Definition Conditionals.h:59
One covariance for every point.
Definition Conditionals.h:49