bpp-phyl3  3.0.0
bpp::ModelList Class Reference

A list of models, for building a WordSubstitutionModel. More...

#include <Bpp/Phyl/Model/AbstractWordSubstitutionModel.h>

+ Collaboration diagram for bpp::ModelList:

Public Member Functions

 ModelList (std::vector< std::unique_ptr< SubstitutionModelInterface >> &models)
 Create a ModelList from one template substitution model. More...
 
size_t size () const
 
std::shared_ptr< SubstitutionModelInterfacegetModel (size_t i)
 
std::shared_ptr< const WordAlphabetgetWordAlphabet ()
 

Protected Attributes

std::vector< std::shared_ptr< SubstitutionModelInterface > > models_
 Position-specific models are stored as shared_ptr to allow several positions to share the same model. The constructors, however, take unique_ptr pointers to ensure that the pointers are not shared outside the model instance. More...
 
std::shared_ptr< WordAlphabetwordAlphabet_
 

Private Member Functions

 ModelList (const ModelList &ml)
 
ModelListoperator= (const ModelList &ml)
 

Detailed Description

A list of models, for building a WordSubstitutionModel.

Instance of ModelList contains a vector of pointers toward a substitution model which they do not own. Several methods are provided to build and check Alphabet and StateMaps.

Definition at line 24 of file AbstractWordSubstitutionModel.h.

Constructor & Destructor Documentation

◆ ModelList() [1/2]

bpp::ModelList::ModelList ( std::vector< std::unique_ptr< SubstitutionModelInterface >> &  models)
inline

Create a ModelList from one template substitution model.

Parameters
modelsA vector of pointers toward substitution model objects.

!! All pointers of the vector will be emptied.

Definition at line 42 of file AbstractWordSubstitutionModel.h.

References models_, and wordAlphabet_.

◆ ModelList() [2/2]

bpp::ModelList::ModelList ( const ModelList ml)
inlineprivate

Definition at line 55 of file AbstractWordSubstitutionModel.h.

Member Function Documentation

◆ getModel()

std::shared_ptr<SubstitutionModelInterface> bpp::ModelList::getModel ( size_t  i)
inline

◆ getWordAlphabet()

std::shared_ptr<const WordAlphabet> bpp::ModelList::getWordAlphabet ( )
inline

Definition at line 67 of file AbstractWordSubstitutionModel.h.

References wordAlphabet_.

◆ operator=()

ModelList& bpp::ModelList::operator= ( const ModelList ml)
inlineprivate

Definition at line 57 of file AbstractWordSubstitutionModel.h.

◆ size()

size_t bpp::ModelList::size ( ) const
inline

Member Data Documentation

◆ models_

std::vector<std::shared_ptr<SubstitutionModelInterface> > bpp::ModelList::models_
protected

Position-specific models are stored as shared_ptr to allow several positions to share the same model. The constructors, however, take unique_ptr pointers to ensure that the pointers are not shared outside the model instance.

Definition at line 30 of file AbstractWordSubstitutionModel.h.

Referenced by getModel(), ModelList(), and size().

◆ wordAlphabet_

std::shared_ptr<WordAlphabet> bpp::ModelList::wordAlphabet_
protected

Definition at line 31 of file AbstractWordSubstitutionModel.h.

Referenced by getWordAlphabet(), and ModelList().


The documentation for this class was generated from the following file: