TreeNode 1.5.2
A library to manipulate phylogenetic trees
Loading...
Searching...
No Matches
PhyloTree.SequenceSimulation.MutableRateMatrix Class Reference

Represents a rate matrix whose values can be changed after initialisation. More...

Inheritance diagram for PhyloTree.SequenceSimulation.MutableRateMatrix:

Public Member Functions

 MutableRateMatrix (ReadOnlySpan< char > states)
 Creates a new MutableRateMatrix with the specified states . More...
 
 MutableRateMatrix (ReadOnlySpan< char > states, double[,] rates)
 Creates a new MutableRateMatrix with the specified states and rates . More...
 

Properties

override ImmutableArray< char > States [get]
 Gets the states for the character to which the rate matrix applies. More...
 
new double this[int from, int to] [get, set]
 Gets or sets 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, but this value cannot be set. More...
 
new double this[char from, char to] [get, set]
 Gets or sets the rate of going from state from to state to . If from == to , the negative sum of the elements on the row is returned, but this value cannot be set. More...
 
override ImmutableArray< double > EquilibriumFrequencies [get]
 Gets the equilibrium frequences of the rate matrix. More...
 
- Properties inherited from PhyloTree.SequenceSimulation.IMutableRateMatrix
sealed 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...
 
sealed 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...
 
- Properties inherited from PhyloTree.SequenceSimulation.RateMatrix
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...
 

Detailed Description

Represents a rate matrix whose values can be changed after initialisation.

Definition at line 114 of file RateMatix.cs.

Constructor & Destructor Documentation

◆ MutableRateMatrix() [1/2]

PhyloTree.SequenceSimulation.MutableRateMatrix.MutableRateMatrix ( ReadOnlySpan< char >  states)

Creates a new MutableRateMatrix with the specified states .

Parameters
statesThe possible states of the character described by the MutableRateMatrix.

Definition at line 297 of file RateMatix.cs.

◆ MutableRateMatrix() [2/2]

PhyloTree.SequenceSimulation.MutableRateMatrix.MutableRateMatrix ( ReadOnlySpan< char >  states,
double  rates[,] 
)

Creates a new MutableRateMatrix with the specified states and rates .

Parameters
statesThe possible states of the character described by the MutableRateMatrix.
ratesA 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
ArgumentExceptionThrown if the number of rows or columns of the rates matrix does not correspond to the number of states .

Definition at line 313 of file RateMatix.cs.

Property Documentation

◆ EquilibriumFrequencies

override ImmutableArray<double> PhyloTree.SequenceSimulation.MutableRateMatrix.EquilibriumFrequencies
get

Gets the equilibrium frequences of the rate matrix.

Definition at line 264 of file RateMatix.cs.

◆ States

override ImmutableArray<char> PhyloTree.SequenceSimulation.MutableRateMatrix.States
get

Gets the states for the character to which the rate matrix applies.

Definition at line 120 of file RateMatix.cs.

◆ this[char from, char to]

new double PhyloTree.SequenceSimulation.MutableRateMatrix.this[char from, char to]
getset

Gets or sets the rate of going from state from to state to . If from == to , the negative sum of the elements on the row is returned, but this value cannot be set.

Parameters
fromThe row state.
toThe column state.
Returns
The rate of going from state from to state to .
Exceptions
ArgumentOutOfRangeExceptionThrown if the state is not part of the rate matrix.
ArgumentExceptionThrown when attempting to set the value of a diagonal entry.

Definition at line 216 of file RateMatix.cs.

◆ this[int from, int to]

new double PhyloTree.SequenceSimulation.MutableRateMatrix.this[int from, int to]
getset

Gets or sets 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, but this value cannot be set.

Parameters
fromThe row number.
toThe column number.
Returns
The rate of going from state number from to state number to .
Exceptions
ArgumentOutOfRangeExceptionThrown if the state index is < 0 or greater than the number of states in the rate matrix.
ArgumentExceptionThrown when attempting to set the value of a diagonal entry.

Definition at line 138 of file RateMatix.cs.


The documentation for this class was generated from the following file: