Open alexeid opened 4 years ago
Maybe, we should have SubstitutionModel
interface. In addition, I suggest to move private void getTransitionProbabilities(double branchLength, double[][] transProbs)
in line 326 in PhyloCTMC
to this interface.
Then, you can remove numStates
from PhyloCTMC
, and all related code, such as:
Array2DRowRealMatrix Qmatrix = new Array2DRowRealMatrix(primitive);
decomposition = new EigenDecomposition(Qmatrix);
Eval = decomposition.getRealEigenvalues();
Ievc = new double[numStates][numStates];
This will allow the equilibrium frequencies and the data type to be provided by the SubstitutionModel along with the instantaneous rate matrix.