LINE Solver (C++)
Templated C++ port of the LINE queueing solver
Loading...
Searching...
No Matches
iltcme_table.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2012-2026, QORE Lab, Imperial College London
3 * All rights reserved.
4 */
5#ifndef LINE_API_MAM_ILTCME_TABLE_H
6#define LINE_API_MAM_ILTCME_TABLE_H
7
8/**
9 * @file
10 * @ingroup api_mam
11 * The vendored concentrated-matrix-exponential (CME) coefficient table that
12 * `matlab_ilt` reads from `iltcme.json`.
13 *
14 * IT IS A .cpp, NOT A HEADER, AND THAT IS THE POINT. The table is ~1.2 MB of
15 * double literals. As an `inline constexpr` array in a header it would be
16 * re-parsed by every translation unit that includes it, and `line_cli.cpp`
17 * already includes every solver header; compiling it once into `line_mp_api`
18 * costs one TU instead. This header carries only the declarations, so the port
19 * stays header-only for everything except this one data blob.
20 *
21 * VENDORED THIRD-PARTY DATA whose licence terms are NOT STATED upstream. See
22 * THIRD-PARTY-NOTICES.md, which records the decision to vendor with that known.
23 */
24
25#include <cstddef>
26
27namespace line {
28namespace mam {
29namespace iltcme {
30
31/**
32 * One CME entry, carrying only the fields `matlab_ilt` reads.
33 *
34 * `iltcme.json` also has `optim`, `phi`, `lognorm` and `mu2`; none is used by
35 * the inverse transform, so none is vendored.
36 */
37struct CmeEntry {
38 int n; ///< number of cosine/sine terms; the transform costs n+1 evaluations
39 double c; ///< constant term
40 double omega; ///< angular frequency
41 double mu1; ///< first moment scale
42 double cv2; ///< squared coefficient of variation; smaller is steeper
43 const double* a; ///< cosine coefficients, length n
44 const double* b; ///< sine coefficients, length n
45 std::size_t len; ///< n, as a size for bounds checks
46};
47
48/** The reachable entries, in table order. */
49extern const CmeEntry kTable[];
50extern const std::size_t kTableSize;
51
52} // namespace iltcme
53} // namespace mam
54} // namespace line
55
56#endif // LINE_API_MAM_ILTCME_TABLE_H
const CmeEntry kTable[]
The reachable entries, in table order.
const std::size_t kTableSize
One CME entry, carrying only the fields matlab_ilt reads.
double omega
angular frequency
const double * a
cosine coefficients, length n
int n
number of cosine/sine terms; the transform costs n+1 evaluations
std::size_t len
n, as a size for bounds checks
double mu1
first moment scale
double cv2
squared coefficient of variation; smaller is steeper
double c
constant term
const double * b
sine coefficients, length n