Transition

Contents

Transition#

class braincell.channel.Transition(src, dst, forward, backward=None)[source]#

One directed or reversible transition used by Markov channels.

A Transition names two states and the rate method(s) that move probability between them; it does not itself hold rates or values. Markov consumes a tuple of these under pairs and builds the generator matrix for the whole state graph from them.

Parameters:
  • src (str) – Name of the source state.

  • dst (str) – Name of the destination state.

  • forward (str) – Name of the rate method that governs the src -> dst direction. Looked up on the owning channel and called the same way as any other rate method.

  • backward (str | None) – Name of the rate method that governs the dst -> src direction. When None, the transition is directed: probability only flows src -> dst and no reverse rate is looked up or evaluated, so the pair contributes nothing to the dst -> src entry of the generator matrix. Supplying a name makes the transition reversible, with independent forward and backward rates.

See also

Markov

Consumes a tuple of Transition under pairs.