40 #ifndef _LAPLACESUBSTITUTIONCOUNT_H_ 41 #define _LAPLACESUBSTITUTIONCOUNT_H_ 44 #include "../Model/SubstitutionModel.h" 68 mutable RowMatrix<double>
m_;
106 std::vector<double> v(0);
118 throw Exception(
"LaplaceSubstitutionCount::setSubstitutionRegister. This SubstitutionsCount only works with a TotalSubstitutionRegister.");
128 #endif //_LAPLACESUBSTITUTIONCOUNT_H_ void setSubstitutionModel(const SubstitutionModel *model)
Set the substitution model associated with this count, if relevent.
Interface for all substitution models.
LaplaceSubstitutionCount(const SubstitutionModel *model, size_t cutOff)
AbstractSubstitutionCount & operator=(const AbstractSubstitutionCount &asc)
std::vector< double > getNumberOfSubstitutionsForEachType(size_t initialState, size_t finalState, double length) const
Get the numbers of susbstitutions on a branch for all types, for an initial and final states...
virtual size_t getNumberOfStates() const
Short cut function, equivalent to getSubstitutionRegister()->getAlphabet()->getSize().
Basic implementation of the the SubstitutionCount interface.
void computeCounts(double length) const
The SubstitutionRegister interface.
void setSubstitutionRegister(SubstitutionRegister *reg)
Matrix< double > * getAllNumbersOfSubstitutions(double length, size_t type=1) const
Get the numbers of susbstitutions on a branch, for each initial and final states, and given the branc...
virtual ~LaplaceSubstitutionCount()
const SubstitutionModel * model_
LaplaceSubstitutionCount & operator=(const LaplaceSubstitutionCount &asc)
LaplaceSubstitutionCount * clone() const
double getNumberOfSubstitutions(size_t initialState, size_t finalState, double length, size_t type=1) const
Get the number of susbstitutions on a branch, given the initial and final states, and the branch leng...
void substitutionRegisterHasChanged()
Laplace estimate of the substitution count.
LaplaceSubstitutionCount(const LaplaceSubstitutionCount &asc)