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

Cumulants from raw moments and the inverse, plus the factorial-cumulant pair. More...

#include <vector>
#include "line/num/number.h"
#include "line/util/error.h"
#include "line/util/matrix.h"
#include "line/util/population.h"
Include dependency graph for moment_cumulant.h:

Go to the source code of this file.

Namespaces

namespace  line
namespace  line::moment

Functions

template<class T>
std::vector< T > line::moment::moment_cumulant_from_raw (const std::vector< T > &m)
 kappa_i = m_i - sum_{k=1}^{i-1} C(i-1,k-1) kappa_k m_{i-k}.
template<class T>
std::vector< T > line::moment::moment_raw_from_cumulant (const std::vector< T > &kappa)
 mi = sum{k=1}^{i} C(i-1,k-1) kappa_k m_{i-k}, with m_0 = 1.
template<class T>
std::vector< T > line::moment::moment_factcumulant_from_factorial (const std::vector< T > &f)
 Factorial cumulants from factorial moments.
template<class T>
std::vector< T > line::moment::moment_factorial_from_factcumulant (const std::vector< T > &kappa)
 Factorial moments from factorial cumulants.

Detailed Description

Cumulants from raw moments and the inverse, plus the factorial-cumulant pair.

Templated port of matlab/src/api/moment/moment_cumulant_from_raw.m, moment_raw_from_cumulant.m, moment_factcumulant_from_factorial.m and moment_factorial_from_factcumulant.m. The recurrence is the one obtained by differentiating log M(t) once, so it is triangular and every operation is integer or rational.

The factorial-cumulant pair is the SAME recurrence read on the factorial sequence, which is why MATLAB delegates rather than duplicating it.

Entry 0 of the cumulant vector is always 0 by convention, and entry 0 of the raw vector is always 1, whatever the caller passes in.

Definition in file moment_cumulant.h.