bpp-phyl3 3.0.0
SubstitutionRegister.cpp
Go to the documentation of this file.
1// SPDX-FileCopyrightText: The Bio++ Development Group
2//
3// SPDX-License-Identifier: CECILL-2.1
4
6
7using namespace bpp;
8using namespace std;
9
10void GeneralSubstitutionRegister::updateTypes_()
11{
12 types_.clear();
13 for (size_t i = 0; i < size_; i++)
14 {
15 for (size_t j = 0; j < size_; j++)
16 {
17 size_t type = matrix_(i, j);
18 map<size_t, vector<size_t>> reg = types_[type];
19 reg[i].push_back(j);
20 }
21 }
22}
size_t size_
The size of the matrix, i.e. the number of states.
RowMatrix< size_t > matrix_
The matrix of the substitution register.
std::map< size_t, std::map< size_t, std::vector< size_t > > > types_
The map from substitution types to the map of from states to the vector of target states.
Defines the basic types of data flow nodes.