40 #ifndef _ONEJUMPSUBSTITUTIONCOUNT_H_ 41 #define _ONEJUMPSUBSTITUTIONCOUNT_H_ 44 #include "../Model/SubstitutionModel.h" 64 mutable RowMatrix<double>
tmp_;
90 if (finalState != initialState)
return 1.;
91 else return 1. -
model_->
Pij_t(initialState, finalState, length);
98 std::vector<double> v(0);
111 throw Exception(
"OneJumpSubstitutionCount::setSubstitutionRegister. This SubstitutionsCount only works with a TotalSubstitutionRegister.");
121 #endif //_ONEJUMPSUBSTITUTIONCOUNT_H_
const SubstitutionModel * model_
Interface for all substitution models.
AbstractSubstitutionCount & operator=(const AbstractSubstitutionCount &asc)
Basic implementation of the the SubstitutionCount interface.
void setSubstitutionRegister(SubstitutionRegister *reg)
The SubstitutionRegister interface.
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...
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...
OneJumpSubstitutionCount(const OneJumpSubstitutionCount &ojsc)
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 double Pij_t(size_t i, size_t j, double t) const =0
Computes the probability that at least one jump occured on a branch, given the initial and final stat...
virtual ~OneJumpSubstitutionCount()
OneJumpSubstitutionCount & operator=(const OneJumpSubstitutionCount &ojsc)
OneJumpSubstitutionCount(const SubstitutionModel *model)
void setSubstitutionModel(const SubstitutionModel *model)
Set the substitution model associated with this count, if relevent.
virtual OneJumpSubstitutionCount * clone() const
void substitutionRegisterHasChanged()