Module markov

Module markov 

Source
Expand description

§Markov chain steady-state flow calculations module

§License

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/.

Code examples both in the docstrings and rendered documentation are free to use.

Structs§

MarkovFlow
MarkovFlow struct contains all results of the Markov flow calculations based on an adjacency matrix, evaporation constant, and scaling toggle.

Functions§

get_flow_matrix
get_flow_matrix calculates the flow matrix after the system is injected with an input vector. Each entry denotes the steady state flow over the corresponding edge.
get_flow_vector
get_flow_vector calculates the flow over every node according to the input vector and sensitivity matrix. It equals the (outer) product of the sensitivity matrix with the input vector.
get_in_vector
get_in_vector calculates the input vector based on the shape of the adjacency matrix and optional scaling. Without scaling, all nodes except the final one (sink) of the sink matrix should be supplied with 1.0 input flow. With scaling, input flow equals the column sum of the adjacency matrix.
get_sensitivity_matrix
get_sensitivity_matrix calculates the sensitivity matrix based on the sink matrix.
get_sink_matrix
get_sink_matrix calculates a column normalized matrix with an added evaporation sink as the last entry. Input adjacency matrix ‘adj’ should be square and ‘mu’ should be a number > 1.0.

Type Aliases§

DMatrix
A dynamically sized column-major matrix.
DVector
A dynamically sized column vector.