![]() |
LINE Solver (C++)
Templated C++ port of the LINE queueing solver
|
Stochastic complement of a DTMC partition, a port of matlab/lib/kpctoolbox/mc/dtmc_stochcomp.m. More...
#include <cmath>#include <cstddef>#include <vector>#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> | |
| Matrix< T > | line::mc::dtmc_stochcomp (const Matrix< T > &P, const std::vector< std::size_t > &keep) |
| Stochastic complement of a DTMC partition, a port of matlab/lib/kpctoolbox/mc/dtmc_stochcomp.m. | |
Stochastic complement of a DTMC partition, a port of matlab/lib/kpctoolbox/mc/dtmc_stochcomp.m.
For a row-stochastic P partitioned into a retained set I and its complement Ic, the stochastic complement over I is S = P11 + P12 (Id - P22)^-1 P21, the routing seen by an observer who watches only the states in I, censoring the excursions through Ic. It is the same construction NetworkStruct's station_routing performs over the stateful nodes, exposed here as a free function so the cacheqn driver can complement a rtnodes matrix it has rewritten in place (relabelling a Cache as a class switch) without going back through route_eff.
ARITHMETIC: field. The only operation is the linear solve (Id - P22) X = P21 by Gaussian elimination with partial pivoting, so it is exact under Rational.
Definition in file dtmc_stochcomp.h.