Package pal.substmodel
Class GeneralPoissonRateMatrix
- java.lang.Object
-
- pal.substmodel.GeneralPoissonRateMatrix
-
- All Implemented Interfaces:
java.io.Serializable,NeoRateMatrix
public class GeneralPoissonRateMatrix extends java.lang.Object implements NeoRateMatrix
A general rate matrix class for JC69/F81 style rate matrices (but for all data types)- Version:
- $Id: GeneralPoissonRateMatrix.java,v 1.3 2004/08/15 03:00:37 matt Exp $
- Author:
- Matthew Goode
- 11 May 2004 - Created file
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description GeneralPoissonRateMatrix(int dimension)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcreateRelativeRates(double[][] rateStore, double[] rateParameters, int startIndex)Create the relative rates arrayvoidgetDefaultRateParameters(double[] store, int startIndex)intgetDimension()intgetNumberOfRateParameters()doublegetRateParameterLowerBound(int parameter)doublegetRateParameterUpperBound(int parameter)java.lang.StringgetUniqueName()booleanisDataTypeCompatible(DataType dt)Check the compatibility of a data type to be used with the rate matrixbooleanisReversible()Is the relative rate matrix described by this rate matrix meant to represent a reversible process? If true only the upper part of the rate matrix needs to be filled in (eg in matrix[i][j], for all where j > i );
-
-
-
Method Detail
-
getUniqueName
public java.lang.String getUniqueName()
- Specified by:
getUniqueNamein interfaceNeoRateMatrix- Returns:
- a short unique human-readable identifier for this rate matrix.
-
isReversible
public boolean isReversible()
Description copied from interface:NeoRateMatrixIs the relative rate matrix described by this rate matrix meant to represent a reversible process? If true only the upper part of the rate matrix needs to be filled in (eg in matrix[i][j], for all where j > i );- Specified by:
isReversiblein interfaceNeoRateMatrix- Returns:
- true (doesn't really matter)
-
getDimension
public int getDimension()
- Specified by:
getDimensionin interfaceNeoRateMatrix- Returns:
- the dimension of this rate matrix. (as for construction)
-
isDataTypeCompatible
public boolean isDataTypeCompatible(DataType dt)
Check the compatibility of a data type to be used with the rate matrix- Specified by:
isDataTypeCompatiblein interfaceNeoRateMatrix- Parameters:
dt- the data type to test- Returns:
- true if data type state count is equal to dimension
-
createRelativeRates
public void createRelativeRates(double[][] rateStore, double[] rateParameters, int startIndex)Description copied from interface:NeoRateMatrixCreate the relative rates array- Specified by:
createRelativeRatesin interfaceNeoRateMatrix- Parameters:
rateStore- The place where the relative rates are stored (should be assumed to be large enough - based on dimension)rateParameters- The parameters to be used to construct the rate storestartIndex- The index into the rateParameters to start reading parameters
-
getNumberOfRateParameters
public int getNumberOfRateParameters()
- Specified by:
getNumberOfRateParametersin interfaceNeoRateMatrix
-
getRateParameterLowerBound
public double getRateParameterLowerBound(int parameter)
- Specified by:
getRateParameterLowerBoundin interfaceNeoRateMatrix
-
getRateParameterUpperBound
public double getRateParameterUpperBound(int parameter)
- Specified by:
getRateParameterUpperBoundin interfaceNeoRateMatrix
-
getDefaultRateParameters
public void getDefaultRateParameters(double[] store, int startIndex)- Specified by:
getDefaultRateParametersin interfaceNeoRateMatrix
-
-