`ContinuousTimeMarkov.CompetingPoisson`

— Method```
CompetingPoisson(rates; events)
```

The first arrival from competing Poisson point processes with the given `rates`

.

`rand`

returns a `NamedTuple{(:duration,:event)}`

, where `duration`

is the duration until the first event and `event`

is drawn from `events`

.

Varios properties are supported, see `propertynames`

.

**Note**

The distribution of `duration`

is `Exponential(1/sum(rates))`

, so this process can also be thought of as competing exponentials.

`ContinuousTimeMarkov.TransitionRateMatrix`

— Method```
TransitionRateMatrix(Q)
```

Create a transition rate matrix from the argument. This makes a copy, checks that off-diagonal elements are nonnegative, and sets the diagonal so that rows sum to `0`

, striving to preserve sparsity and structure.

`ContinuousTimeMarkov.TransitionRateMatrix!`

— Method```
TransitionRateMatrix!(Q)
```

Create a `TransitionRateMatrix`

from a matrix `Q`

. Modifies the argument (to normalize the diagonal).

`ContinuousTimeMarkov._off_diagonal_checked_row_sum!`

— Method```
_off_diagonal_checked_row_sum!(d, A)
```

Accumulate the sum of off-diagonal elements into `d`

by row. Return `d`

.

Internal, not part of the API. Works with generalized indexing.

`ContinuousTimeMarkov.checked_square_axis`

— Method```
checked_square_axis(A)
```

Assert that both axes are the same, and return a single one.

Internal, not part of the API. Works with generalized indexing.

`ContinuousTimeMarkov.normalize_diagonal!`

— Method```
normalize_diagonal!(A)
```

Set the diagonal of the argument (which is modified) so that rows sum to `0`

.

Internal, not part of the API. Works with generalized indexing.

`ContinuousTimeMarkov.off_diagonal_checked_row_sum`

— Method```
off_diagonal_checked_row_sum(A)
```

Check that off-diagonal elements are nonnegative, and return their sum by row.

Internal, not part of the API. Works with generalized indexing.

`ContinuousTimeMarkov.stationary_distribution`

— Method```
stationary_distribution(m)
```

Return the stationary distribution of a transition rate matrix as a vector.