Skip to content

Commit

Permalink
updated ctmc docs to reflect newest functions
Browse files Browse the repository at this point in the history
  • Loading branch information
juanfperez committed Dec 20, 2024
1 parent 98d8cd8 commit e60a176
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 1 deletion.
Binary file added dist/jmarkov-0.1.1-py3-none-any.whl
Binary file not shown.
Binary file added dist/jmarkov-0.1.1.tar.gz
Binary file not shown.
8 changes: 8 additions & 0 deletions docs/source/usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,14 @@ Continuous-time Markov chains

.. automethod:: jmarkov.ctmc.ctmc.transient_probabilities

.. automethod:: jmarkov.ctmc.ctmc.first_passage_time

.. automethod:: jmarkov.ctmc.ctmc.occupation_time

.. automethod:: jmarkov.ctmc.ctmc.is_irreducible

.. automethod:: jmarkov.ctmc.ctmc.is_ergodic

Discrete-time Markov chains
-----------------------------

Expand Down
9 changes: 9 additions & 0 deletions jmarkov/ctmc.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,15 @@ def first_passage_time(self, target:str):
return t

def occupation_time(self,T,Epsilon=0.00001):
"""
Computes the expected occupation time in each state until time T.
This method computes the expected time the chain spends in each state,
from time 0 until time T. To this end it uses the embedded matrix and
the uniformization method.
Returns the expected time in each state from 0 to T
"""
n=self.n_states
m=self.generator.copy()
def P_from_R(n,m):
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "hatchling.build"

[project]
name = "jmarkov"
version = "0.1.0"
version = "0.1.1"
authors = [
{ name="Juan F Perez", email="juanfernando.perez@gmail.com" },
]
Expand Down

0 comments on commit e60a176

Please sign in to comment.