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

Whether a (D0, D1, ...) list is a valid phase-type / MAP representation. More...

#include <cmath>
#include <cstddef>
#include <vector>
#include "line/lang/lang_types.h"
#include "line/util/matrix.h"
Include dependency graph for sn_is_phasetype.h:

Go to the source code of this file.

Namespaces

namespace  line
namespace  line::api

Functions

template<class T>
bool line::api::sn_is_phasetype (const std::vector< Matrix< T > > &maps, const std::vector< T > &pie)
 Whether a (D0, D1, ...) list is a valid phase-type / MAP representation.
template<class T>
bool line::api::sn_is_phasetype (const std::vector< Matrix< T > > &maps)

Detailed Description

Whether a (D0, D1, ...) list is a valid phase-type / MAP representation.

Port of matlab/src/api/sn/sn_is_phasetype.m. D0 has non-negative off-diagonals, every further block is non-negative, and the entry vector, when supplied, is non-negative. It does NOT check that the rows sum to zero – refreshProcessRepresentations calls it to decide whether a fitted representation may be USED, and a representation that fails only the row-sum test has a different problem.

A representation that cannot be inspected – an empty list, a shorter one than (D0, D1), a non-square D0, a D0 carrying NaN – returns TRUE, exactly as the reference does: the predicate reports a DEFECT it can see, and "nothing to see" is not a defect. A block after D0 that carries NaN is skipped for the same reason.

ARITHMETIC: field. Sign tests against GlobalConstants::Zero.

Definition in file sn_is_phasetype.h.