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§
- Markov
Flow - 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.