Convert an LNA path from the counting process on transition events to the compartment densities on their natural scale, making the conversion in place for an existing census matrix.

convert_lna2(path, flow_matrix, init_state, statemat)

Arguments

path

matrix containing the LNA path in terms of the counting processes on transition events

flow_matrix

stoichiometry matrix (the transpose of the flow matrix)

init_state

initial compartment counts on the natural scale

statemat

matrix where the compartment counts should be written

The process can be re-expressed by left-multiplying each row in the path matrix by the stoichiometry matrix: \(X_t = A'\phi(t, N_t)\).