10unique_ptr<Matrix<double>> NaiveSubstitutionCount::getAllNumbersOfSubstitutions(
double length,
size_t type)
const
13 auto mat = make_unique<RowMatrix<double>>(n, n);
14 for (
size_t i = 0; i < n; ++i)
16 for (
size_t j = 0; j < n; ++j)
29 for (
auto i = 0; i < n; ++i)
31 for (
auto j = 0; j < n; ++j)
40 std::shared_ptr<const SubstitutionModelInterface> model) :
43 label_(model->getNumberOfStates(), model->getNumberOfStates()),
44 supportedChars_(model->getAlphabetStates())
48 for (
size_t i = 0; i < n; ++i)
50 for (
size_t j = 0; j < n; ++j)
61 std::shared_ptr<const StateMapInterface> stateMap) :
64 label_(stateMap->getNumberOfModelStates(), stateMap->getNumberOfModelStates()),
65 supportedChars_(stateMap->getAlphabetStates())
69 for (
size_t i = 0; i < n; ++i)
71 for (
size_t j = 0; j < n; ++j)
Partial implementation of the SubstitutionCount interface.
std::shared_ptr< const SubstitutionRegisterInterface > register_
std::shared_ptr< const AlphabetIndex2 > weights_
LabelSubstitutionCount(std::shared_ptr< const SubstitutionModelInterface > model)
LinearMatrix< double > label_
std::vector< int > supportedChars_
void storeAllNumbersOfSubstitutions(double length, size_t type, Eigen::MatrixXd &mat) const override
Stores the numbers of susbstitutions on a branch, for each initial and final states,...
std::vector< int > supportedChars_
std::size_t count(const std::string &s, const std::string &pattern)
Defines the basic types of data flow nodes.