40 #ifndef _SUBSTITUTIONCOUNT_H_ 41 #define _SUBSTITUTIONCOUNT_H_ 44 #include "../Model/SubstitutionModel.h" 46 #include <Bpp/Numeric/Matrix/Matrix.h> 71 public virtual Clonable
132 virtual double getNumberOfSubstitutions(
size_t initialState,
size_t finalState,
double length,
size_t type)
const = 0;
216 #endif //_SUBSTITUTIONCOUNT_H_ Interface for all substitution models.
void setSubstitutionRegister(SubstitutionRegister *reg)
attribution of a SubstitutionRegister
AbstractSubstitutionCount & operator=(const AbstractSubstitutionCount &asc)
std::auto_ptr< SubstitutionRegister > register_
virtual size_t getNumberOfStates() const
Short cut function, equivalent to getSubstitutionRegister()->getAlphabet()->getSize().
Basic implementation of the the SubstitutionCount interface.
The SubstitutionRegister interface.
virtual double getNumberOfSubstitutions(size_t initialState, size_t finalState, double length, size_t type) const =0
Get the number of susbstitutions on a branch, given the initial and final states, and the branch leng...
virtual SubstitutionCount * clone() const =0
virtual const SubstitutionRegister * getSubstitutionRegister() const =0
virtual std::vector< double > getNumberOfSubstitutionsForEachType(size_t initialState, size_t finalState, double length) const =0
Get the numbers of susbstitutions on a branch for all types, for an initial and final states...
virtual size_t getNumberOfSubstitutionTypes() const
Short cut function, equivalent to getSubstitutionRegister().getNumberOfSubstitutionTypes().
AbstractSubstitutionCount(const AbstractSubstitutionCount &asc)
const SubstitutionRegister * getSubstitutionRegister() const
bool hasSubstitutionRegister() const
virtual const Alphabet * getAlphabet() const
Short cut function, equivalent to getSubstitutionRegister()->getAlphabet().
The SubstitutionsCount interface.
virtual size_t getNumberOfSubstitutionTypes() const =0
SubstitutionRegister * getSubstitutionRegister()
AbstractSubstitutionCount(SubstitutionRegister *reg)
virtual bool hasSubstitutionRegister() const =0
virtual void setSubstitutionModel(const SubstitutionModel *model)=0
Set the substitution model associated with this count, if relevent.
virtual ~SubstitutionCount()
virtual Matrix< double > * getAllNumbersOfSubstitutions(double length, size_t type) const =0
Get the numbers of susbstitutions on a branch, for each initial and final states, and given the branc...
virtual void substitutionRegisterHasChanged()=0
virtual void setSubstitutionRegister(SubstitutionRegister *reg)=0
~AbstractSubstitutionCount()
virtual const Alphabet * getAlphabet() const =0