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

Binomial moments from tail moments and the inverse. More...

#include <vector>
#include "line/api/moment/moment_housematrix.h"
#include "line/num/number.h"
#include "line/util/error.h"
#include "line/util/matrix.h"
Include dependency graph for moment_tail.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_binomial_from_tail (const std::vector< T > &t)
 bi = sum{k>=i} C(k-1,i-1) t_k.
template<class T>
std::vector< T > line::moment::moment_tail_from_binomial (const std::vector< T > &b)
 ti = sum{k>=i} (-1)^(k-i) C(k-1,i-1) b_k.

Detailed Description

Binomial moments from tail moments and the inverse.

Templated port of matlab/src/api/moment/moment_binomial_from_tail.m and moment_tail_from_binomial.m. These are the only edges of the house of moments whose table is UPPER triangular, so both directions read the WHOLE remaining sequence: b_i depends on t_i,...,t_n. Truncating the input therefore truncates the information, not just the output order.

Reference: A. Heindl and A. van de Liefvoort. Moment conversions for discrete distributions. PMCCS, 2003.

Definition in file moment_tail.h.