butools.ph.APHFrom2Moments¶
-
butools.ph.
APHFrom2Moments
()¶ Matlab: [alpha, A] = APHFrom2Moments(moms, maxSize)
Mathematica: {alpha, A} = APHFrom2Moments[moms, maxSize]
Python/Numpy: alpha, A = APHFrom2Moments(moms, maxSize)
Returns an acyclic PH which has the same 2 moments as given. If detects the order and the structure automatically to match the given moments.
Parameters: moms : vector of doubles, length(2)
The moments to match
maxSize : int, optional
The maximal size of the resulting APH. The default value is 100.
Returns: alpha : vector, shape (1,M)
The initial probability vector of the APH
A : matrix, shape (M,M)
Transient generator matrix of the APH
Raises an error if the moments are not feasible with an
APH of size “maxSize”.