TommasoBelluzzo / PyDTMC

A library for discrete-time Markov chains analysis.
MIT License
80 stars 18 forks source link

fix:fundamental matrix trans states #2

Closed Marius1311 closed 5 years ago

Marius1311 commented 5 years ago

This is a small change that concerns when we compute absorption probabilities and fundamental matrices

Description

In principle, we can compute fundamental matrixes and absorption probabilities as soon as we have transient states. This PR adds a little if statement that checks whether there are any transient states. Previously, for the absorption probs, I checked whether the MC is not irreducible, but that's not quite right because for an MC with two disconnected closed recurrent classes, we could not compute absorption probabilities even though this MC is reducible.

Motivation and Context

Implementation