Struct on_effective_size_drop_policy

Struct Documentation

struct on_effective_size_drop_policy

Implementation detail for a on_effective_size_drop_policy object.

Public Functions

template<class Range>
inline constexpr bool operator()(Range &&range, double threshold = kDefaultThreshold) const

Overload that implements the condition.

Template Parameters:

Range – The type of the range containing particles.

Parameters:
  • range – The range containing particles for which the ESS is calculated.

  • threshold – Percentage threshold to use for detecting the drop.

Returns:

True if resampling should be triggered, false otherwise.

inline constexpr auto operator()(double threshold) const

Overload that binds a specified threshold.

Public Static Attributes

static constexpr double kDefaultThreshold = 0.5

Default percentage threshold.