![]() |
LINE Solver (C++)
Templated C++ port of the LINE queueing solver
|
Feasibility predicates for generators and stochastic matrices. More...
#include <cstddef>#include "line/num/number.h"#include "line/util/error.h"#include "line/util/matrix.h"Go to the source code of this file.
Namespaces | |
| namespace | line |
| namespace | line::mc |
Functions | |
| template<class T> | |
| bool | line::mc::ctmc_isfeasible (const Matrix< T > &Q, const T &tol) |
| True when Q is square, has nonnegative off-diagonals, nonpositive diagonal and zero row sums. | |
| template<class T> | |
| bool | line::mc::ctmc_isfeasible (const Matrix< T > &Q) |
| Default tolerance 1e-10, matching the MATLAB signature. | |
| template<class T> | |
| int | line::mc::dtmc_isfeasible (const Matrix< T > &P) |
| Largest precision level 1..15 at which P is stochastic, or 0 when none holds. | |
Feasibility predicates for generators and stochastic matrices.
Templated port of matlab/src/api/mc/ctmc_isfeasible.m and matlab/lib/kpctoolbox/mc/dtmc_isfeasible.m.
The two return different things and that difference is deliberate. The CTMC predicate is a BOOLEAN at a caller-supplied tolerance. The DTMC one returns a PRECISION LEVEL: the largest tol in 1..15 at which the row sums are within 10^-tol of one and the entries are above -10^-tol, and 0 when no level holds. A caller that reads the DTMC result as a boolean is right by accident, since any nonzero level is truthy, but a caller that compares it to 1 is wrong.
Definition in file ctmc_isfeasible.h.