Represents a rate matrix whose values cannot be changed after initialisation.
More...
|
override ImmutableArray< char > | States [get] |
| Gets the states for the character to which the rate matrix applies. More...
|
|
override ImmutableArray< double > | EquilibriumFrequencies [get] |
| Gets the equilibrium frequences of the rate matrix. More...
|
|
override double | this[int from, int to] [get] |
| Gets the rate of going from state number from to state number to . If from == to , the negative sum of the elements on the row is returned. More...
|
|
override double | this[char from, char to] [get] |
| Gets the rate of going from state from to state to . If from == to , the negative sum of the elements on the row is returned. More...
|
|
abstract ImmutableArray< char > | States [get] |
| Gets the states for the character to which the rate matrix applies. More...
|
|
abstract ImmutableArray< double > | EquilibriumFrequencies [get] |
| Gets the equilibrium frequences of the rate matrix. More...
|
|
abstract double | this[int from, int to] [get] |
| Gets the rate of going from state number from to state number to . If from == to , the negative sum of the elements on the row is returned. More...
|
|
abstract double | this[char from, char to] [get] |
| Gets the rate of going from state from to state to . If from == to , the negative sum of the elements on the row is returned. More...
|
|
Represents a rate matrix whose values cannot be changed after initialisation.
Definition at line 371 of file RateMatix.cs.
◆ ImmutableRateMatrix() [1/2]
PhyloTree.SequenceSimulation.ImmutableRateMatrix.ImmutableRateMatrix |
( |
ReadOnlySpan< char > |
states, |
|
|
double |
rates[,] |
|
) |
| |
Creates a new ImmutableRateMatrix with the specified states and rates .
- Parameters
-
states | The possible states of the character described by the ImmutableRateMatrix. |
rates | A 2D double> array containing the rates used to initialise the matrix. The number of rows and columns in the array must be equal to the number of states. Diagonal entries are ignored. |
- Exceptions
-
ArgumentException | Thrown if the number of rows or columns of the rates matrix does not correspond to the number of states . |
Definition at line 458 of file RateMatix.cs.
◆ ImmutableRateMatrix() [2/2]
PhyloTree.SequenceSimulation.ImmutableRateMatrix.ImmutableRateMatrix |
( |
ReadOnlySpan< char > |
states, |
|
|
double |
rates[,], |
|
|
double[] |
equilibriumFrequencies |
|
) |
| |
Creates a new ImmutableRateMatrix with the specified states and rates .
- Parameters
-
states | The possible states of the character described by the ImmutableRateMatrix. |
rates | A 2D double> array containing the rates used to initialise the matrix. The number of rows and columns in the array must be equal to the number of states. Diagonal entries are ignored. |
equilibriumFrequencies | Equilibrium frequencies for the rate matrix. These are not checked, so they better be correct! |
- Exceptions
-
ArgumentException | Thrown if the number of rows or columns of the rates matrix, or the number of equilibrium frequencies, does not correspond to the number of states . |
Using this constructor is faster than the ImmutableRateMatrix(ReadOnlySpan<char>, double[,]) constructor, as equilbrium frequencies are not computed. This is especially useful for pre-baked rate matrices.
Definition at line 511 of file RateMatix.cs.
◆ EquilibriumFrequencies
override ImmutableArray<double> PhyloTree.SequenceSimulation.ImmutableRateMatrix.EquilibriumFrequencies |
|
get |
Gets the equilibrium frequences of the rate matrix.
Definition at line 381 of file RateMatix.cs.
◆ States
override ImmutableArray<char> PhyloTree.SequenceSimulation.ImmutableRateMatrix.States |
|
get |
Gets the states for the character to which the rate matrix applies.
Definition at line 376 of file RateMatix.cs.
◆ this[char from, char to]
override double PhyloTree.SequenceSimulation.ImmutableRateMatrix.this[char from, char to] |
|
get |
Gets the rate of going from state from to state to . If from == to
, the negative sum of the elements on the row is returned.
- Parameters
-
from | The row state. |
to | The column state. |
- Returns
- The rate of going from state from to state to .
- Exceptions
-
ArgumentOutOfRangeException | Thrown if the state is not part of the rate matrix. |
Definition at line 429 of file RateMatix.cs.
◆ this[int from, int to]
override double PhyloTree.SequenceSimulation.ImmutableRateMatrix.this[int from, int to] |
|
get |
Gets the rate of going from state number from to state number to . If from == to
, the negative sum of the elements on the row is returned.
- Parameters
-
from | The row number. |
to | The column number. |
- Returns
- The rate of going from state number from to state number to .
- Exceptions
-
ArgumentOutOfRangeException | Thrown if the state index is < 0 or greater than the number of states in the rate matrix. |
Definition at line 397 of file RateMatix.cs.
The documentation for this class was generated from the following file: