LINE Solver (C++)
Templated C++ port of the LINE queueing solver
Loading...
Searching...
No Matches
line::mam::MeSampler< T > Class Template Reference

Stateful ME sampler holding the inversion table. More...

#include <line/api/mam/me_sample.h>

Inheritance diagram for line::mam::MeSampler< T >:

Public Member Functions

 MeSampler ()
 MeSampler (const Map< T > &m, const std::vector< T > &a0=std::vector< T >())
 Build the table of m, whose D0 is the ME matrix and whose entry law is map_pie.
double next (pfqn::McRng &rng) const
 One variate, consuming exactly one uniform.
double quantile (double u) const
 The inverse CDF at u, exposed so a caller can supply its own uniform.

Detailed Description

template<class T>
class line::mam::MeSampler< T >

Stateful ME sampler holding the inversion table.

The table is what makes the LDES usage pattern – one variate per service event, from a generator that lives as long as the station does – cost a binary search rather than a matrix exponential.

Definition at line 161 of file me_sample.h.

Constructor & Destructor Documentation

◆ MeSampler() [1/2]

template<class T>
line::mam::MeSampler< T >::MeSampler ( )
inline

Definition at line 163 of file me_sample.h.

◆ MeSampler() [2/2]

template<class T>
line::mam::MeSampler< T >::MeSampler ( const Map< T > & m,
const std::vector< T > & a0 = std::vector<T>() )
inlineexplicit

Build the table of m, whose D0 is the ME matrix and whose entry law is map_pie.

Definition at line 167 of file me_sample.h.

References line::mam::Map< T >::D0, line::expm(), line::InputError::InputError(), line::mam::map_mean(), line::mam::map_pie(), line::mam::map_var(), and line::mam::Map< T >::order().

Member Function Documentation

◆ next()

template<class T>
double line::mam::MeSampler< T >::next ( pfqn::McRng & rng) const
inline

One variate, consuming exactly one uniform.

Definition at line 236 of file me_sample.h.

References line::pfqn::mc_uniform01(), and quantile().

Referenced by line::mam::me_sample().

◆ quantile()

template<class T>
double line::mam::MeSampler< T >::quantile ( double u) const
inline

The inverse CDF at u, exposed so a caller can supply its own uniform.

Definition at line 242 of file me_sample.h.

Referenced by next().


The documentation for this class was generated from the following file: