![]() |
LINE Solver (C++)
Templated C++ port of the LINE queueing solver
|
Classes | |
| struct | Checked |
Functions | |
| void | input (const char *kind, const std::string &msg) |
| void | numerical (const char *kind, const std::string &msg) |
| std::string | fmt_g (double v) |
| void | seed_stream (rng::Mrg32k3a &g, long long seed) |
| Six MRG32k3a seeds from one integer, the affine map of sim_prio_tailquantile. | |
| double | vsum (const std::vector< double > &x) |
| long long | pick (const std::vector< double > &w, double u) |
| Index drawn from the weights w by the uniform u, by a left-to-right scan; -1 if none is positive. | |
| double | var (const std::vector< double > &x) |
| Sample variance with the n - 1 denominator. | |
| Checked | check_options (const std::vector< double > &t, const HittingDistOptions &opt) |
| The option and time checks MATLAB runs before looking at the chain, in its order. | |
| template<class State, class Step, class IsRates, class Target> | |
| void | run_cycle (const Step &step, const IsRates &isr, bool useIS, const Target &target, const State &x0, double maxsteps, rng::Mrg32k3a &g, double &a, bool &hit, double &L) |
| One regenerative cycle from x0: a = T ^ tau, hit = I(T < tau) and L the likelihood ratio of the path (1 without a change of measure). | |
| template<class State, class Step, class IsRates, class Target> | |
| HittingDistResult | estimate (const Step &step, const IsRates &isr, bool hasIS, const Target &target, const State &x0, const std::vector< double > &t, const Checked &c, const HittingDistOptions &opt) |
| The cycles and the five estimators, common to both forms. | |
| HittingDistResult | generator_form (const Matrix< double > &Q, int x0, const std::function< std::vector< char >(std::size_t)> &makeMask, const std::vector< double > &t, const HittingDistOptions &opt) |
| Generator form after the target has been turned into a mask by makeMask(n). | |
| Matrix< double > | to_matrix (const std::vector< std::vector< double > > &Q) |
| std::function< std::vector< char >(std::size_t)> | index_mask (const std::vector< int > &target) |
| std::function< std::vector< char >(std::size_t)> | bool_mask (const std::vector< bool > &target) |
|
inline |
Definition at line 554 of file ctmc_hitting_dist.h.
References bool_mask(), and input().
Referenced by bool_mask(), line::mc::ctmc_hitting_dist(), and line::mc::ctmc_hitting_dist().
|
inline |
The option and time checks MATLAB runs before looking at the chain, in its order.
Definition at line 211 of file ctmc_hitting_dist.h.
References check_options(), input(), line::mc::detail_hit::Checked::method, line::mc::detail_hit::Checked::nboot, line::mc::detail_hit::Checked::nCS, and line::mc::detail_hit::Checked::nIS.
Referenced by check_options(), line::mc::ctmc_hitting_dist(), line::mc::ctmc_hitting_dist(), line::mc::ctmc_hitting_dist(), and generator_form().
| HittingDistResult line::mc::detail_hit::estimate | ( | const Step & | step, |
| const IsRates & | isr, | ||
| bool | hasIS, | ||
| const Target & | target, | ||
| const State & | x0, | ||
| const std::vector< double > & | t, | ||
| const Checked & | c, | ||
| const HittingDistOptions & | opt ) |
The cycles and the five estimators, common to both forms.
Definition at line 296 of file ctmc_hitting_dist.h.
References line::mc::HittingDistResult::cte, line::mc::HittingDistResult::cteci, estimate(), line::mc::HittingDistResult::eta, line::mc::HittingDistResult::F, line::mc::HittingDistResult::Fboot, line::mc::HittingDistResult::Fconv, line::mc::HittingDistResult::Fcorr, line::mc::HittingDistResult::Fexp, line::mc::HittingDistResult::Fgamma, fmt_g(), line::mc::HittingDistResult::hitsCS, line::mc::HittingDistResult::hitsIS, input(), line::mc::detail_hit::Checked::method, line::mc::HittingDistResult::method, line::mc::HittingDistResult::mu, line::mc::HittingDistResult::muci, line::mc::detail_hit::Checked::nboot, line::mc::detail_hit::Checked::nCS, line::mc::HittingDistResult::nCS, line::rng::Mrg32k3a::next_double(), line::mc::detail_hit::Checked::nIS, line::mc::HittingDistResult::nIS, numerical(), line::mc::HittingDistResult::p, pick(), line::mc::HittingDistResult::q, line::mc::HittingDistResult::quantile, line::mc::HittingDistResult::quantileci, line::mc::HittingDistResult::r, line::mc::HittingDistResult::rate, run_cycle(), seed_stream(), line::mc::HittingDistResult::shape, line::sim::sim_norminv(), line::mc::HittingDistResult::theta, var(), vsum(), and line::mc::HittingDistResult::zeta.
Referenced by line::mc::ctmc_hitting_dist(), estimate(), and generator_form().
|
inline |
Definition at line 157 of file ctmc_hitting_dist.h.
References fmt_g().
Referenced by estimate(), fmt_g(), and run_cycle().
|
inline |
Generator form after the target has been turned into a mask by makeMask(n).
Definition at line 485 of file ctmc_hitting_dist.h.
References check_options(), line::Matrix< T >::cols(), estimate(), generator_form(), input(), and line::Matrix< T >::rows().
Referenced by line::mc::ctmc_hitting_dist(), line::mc::ctmc_hitting_dist(), line::mc::ctmc_hitting_dist(), line::mc::ctmc_hitting_dist(), and generator_form().
|
inline |
Definition at line 542 of file ctmc_hitting_dist.h.
References index_mask(), and input().
Referenced by line::mc::ctmc_hitting_dist(), line::mc::ctmc_hitting_dist(), and index_mask().
|
inline |
Definition at line 149 of file ctmc_hitting_dist.h.
References input(), and line::InputError::InputError().
Referenced by bool_mask(), check_options(), line::mc::ctmc_hitting_dist(), estimate(), generator_form(), index_mask(), input(), run_cycle(), and to_matrix().
|
inline |
Definition at line 153 of file ctmc_hitting_dist.h.
References numerical(), and line::NumericError::NumericError().
Referenced by estimate(), numerical(), and run_cycle().
|
inline |
Index drawn from the weights w by the uniform u, by a left-to-right scan; -1 if none is positive.
Definition at line 182 of file ctmc_hitting_dist.h.
References pick(), and vsum().
Referenced by estimate(), pick(), and run_cycle().
| void line::mc::detail_hit::run_cycle | ( | const Step & | step, |
| const IsRates & | isr, | ||
| bool | useIS, | ||
| const Target & | target, | ||
| const State & | x0, | ||
| double | maxsteps, | ||
| rng::Mrg32k3a & | g, | ||
| double & | a, | ||
| bool & | hit, | ||
| double & | L ) |
One regenerative cycle from x0: a = T ^ tau, hit = I(T < tau) and L the likelihood ratio of the path (1 without a change of measure).
Step: void(const State& x, std::vector<State>& Y, std::vector<double>& rt) IsRates: void(const State& x, const std::vector<State>& Y, const std::vector<double>& rt, std::vector<double>& ri) Target: bool(const State& x)
Definition at line 248 of file ctmc_hitting_dist.h.
References fmt_g(), input(), line::InternalError::InternalError(), line::rng::Mrg32k3a::next_double(), numerical(), pick(), run_cycle(), and vsum().
Referenced by estimate(), and run_cycle().
|
inline |
Six MRG32k3a seeds from one integer, the affine map of sim_prio_tailquantile.
Definition at line 164 of file ctmc_hitting_dist.h.
References seed_stream(), and line::rng::Mrg32k3a::set_seed().
Referenced by estimate(), and seed_stream().
|
inline |
Definition at line 530 of file ctmc_hitting_dist.h.
References input(), line::Matrix< T >::size(), and to_matrix().
Referenced by line::mc::ctmc_hitting_dist(), line::mc::ctmc_hitting_dist(), and to_matrix().
|
inline |
Sample variance with the n - 1 denominator.
Definition at line 197 of file ctmc_hitting_dist.h.
Referenced by estimate(), and var().
|
inline |
Definition at line 175 of file ctmc_hitting_dist.h.
References vsum().
Referenced by estimate(), pick(), run_cycle(), var(), and vsum().