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

Conversion matrix of one edge of the house of moments. More...

Include dependency graph for moment_housematrix.h:

Go to the source code of this file.

Namespaces

namespace  line
namespace  line::moment

Enumerations

enum class  line::moment::MomentEdge {
  line::moment::FactorialFromRaw , line::moment::RawFromFactorial , line::moment::UpfactorialFromRaw , line::moment::RawFromUpfactorial ,
  line::moment::BinomialFromFactorial , line::moment::NegbinomialFromUpfactorial , line::moment::FactorialFromBinomial , line::moment::UpfactorialFromNegbinomial ,
  line::moment::FactorialFromUpfactorial , line::moment::UpfactorialFromFactorial , line::moment::NegbinomialFromBinomial , line::moment::BinomialFromNegbinomial ,
  line::moment::BinomialFromTail , line::moment::TailFromBinomial
}
 Edge labels of the house of moments, one per MATLAB edge string. More...

Functions

MomentEdge line::moment::moment_edge_from_string (const std::string &edge)
 Parses the MATLAB edge string into its label.
template<class T>
Matrix< T > line::moment::moment_housematrix (MomentEdge edge, int n)
 (n+1)x(n+1) conversion table of the given edge.
template<class T>
Matrix< T > line::moment::moment_housematrix (const std::string &edge, int n)
 String overload matching the MATLAB call signature.
template<class T>
std::vector< T > line::moment::moment_apply_full (const Matrix< T > &A, const std::vector< T > &v)
 Full matrix-vector product, needed because the tail edges are upper triangular.

Detailed Description

Conversion matrix of one edge of the house of moments.

Templated port of matlab/src/api/moment/moment_housematrix.m. The house of moments collects the raw, factorial, upper-factorial, binomial, negative-binomial and tail sequences of a discrete law; every edge of it is a linear map with an integer or rational table, so the exact instantiation returns the transform with no rounding at all.

The tail edges are the only UPPER triangular ones, so a caller must apply the table with a full matrix-vector product and not with the lower-triangular apply_table helper.

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

Definition in file moment_housematrix.h.