LINE Solver (C++)
Templated C++ port of the LINE queueing solver
Loading...
Searching...
No Matches
fj_types.h File Reference

Shared return types and arithmetic helpers for the templated fork-join port. More...

#include <cmath>
#include <cstddef>
#include <functional>
#include <string>
#include "line/num/number.h"
#include "line/util/error.h"
Include dependency graph for fj_types.h:

Go to the source code of this file.

Classes

struct  line::fj::FJBoundsResult< T >
 [Rmax, Rmin] of fj_bounds: pessimistic and optimistic response-time bounds. More...
struct  line::fj::FJCharMaxResult< T >
 [MK, mK] of fj_char_max: characteristic maximum and its threshold. More...
struct  line::fj::FJGKBoundResult< T >
 All four G(K) factors of fj_gk_bound in its 'all' mode. More...
struct  line::fj::FJXmaxApproxResult< T >
 [Xmax, GK] of fj_xmax_approx. More...
struct  line::fj::FJXmaxNormalResult< T >
 [Xmax, Vmax] of fj_xmax_normal. More...
struct  line::fj::FJXmaxParetoResult< T >
 [Xmax, MK] of fj_xmax_pareto. More...
struct  line::fj::FJOrderStatResult< T >
 [F_Yk, E_Yk] of fj_order_stat. More...
struct  line::fj::FJQuorumMomentsResult< T >
 [m, v] of fj_quorum_moments: mean and variance of the k-of-n join time. More...

Namespaces

namespace  line
namespace  line::fj

Enumerations

enum class  line::fj::FJDistType { line::fj::Exp , line::fj::Uniform , line::fj::Evd , line::fj::Bound }
 Distribution families for which a G(K) standardized-maximum factor exists. More...
enum class  line::fj::FJNormalMethod { line::fj::Johnson , line::fj::Arnold , line::fj::Corrected }
 Bracketing methods for the normal-maximum approximation. More...

Detailed Description

Shared return types and arithmetic helpers for the templated fork-join port.

The MATLAB fork-join family in matlab/src/api/fj/ returns a scalar in most cases but a pair in a few (fj_bounds, fj_char_max, fj_xmax_normal, fj_xmax_pareto, fj_xmax_approx, fj_order_stat, fj_quorum_moments) and a struct in one (fj_gk_bound). Those aggregates live here, together with the handful of ADL wrappers and the binomial coefficient the family needs; each ported function lives in its own header named after the MATLAB file, as required by the port convention.

The binomial coefficient is built multiplicatively so that every partial product is an integer: in exact arithmetic C(n,k) is therefore exact for any n, with no overflow and no rounding, which is what makes the alternating sums in fj_respt_vm and fj_xmax_erlang trustworthy. Those sums cancel catastrophically in double past K ~ 20; the exact instantiation is the only way to see how much of the double answer is left.

Definition in file fj_types.h.