Celeritas 0.7.0-dev.127+develop.e63889793
Loading...
Searching...
No Matches
Classes | Enumerations | Functions
Selector.hh File Reference
#include <type_traits>
#include "corecel/cont/Range.hh"
#include "corecel/math/Algorithms.hh"
#include "corecel/math/SoftEqual.hh"
#include "corecel/random/distribution/GenerateCanonical.hh"
This graph shows which files directly or indirectly include this file:

Classes

class  celeritas::Selector< F, T >
 On-the-fly selection of a weighted discrete distribution. More...
 

Enumerations

enum class  celeritas::SelectorNormalization { unnormalized , normalized }
 Whether to allow a "remainder" element. More...
 

Functions

template<class F , class T >
CELER_FUNCTION Selector< F, Tceleritas::make_selector (F &&func, T size, real_type total=1)
 Create a normalized on-the-fly discrete PDF sampler.
 
template<class F , class T >
CELER_FUNCTION Selector< F, Tceleritas::make_unnormalized_selector (F &&func, T size, real_type total)
 Create an unnormalized selector that can return size if past the end.
 

Enumeration Type Documentation

◆ SelectorNormalization

Whether to allow a "remainder" element.

Enumerator
unnormalized 

Components will not sum to total.

normalized 

Components should sum to total.