bpp-seq3  3.0.0
DistanceMatrix.cpp
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: The Bio++ Development Group
2 //
3 // SPDX-License-Identifier: CECILL-2.1
4 
5 #include "DistanceMatrix.h"
6 
7 using namespace std;
8 
9 using namespace bpp;
10 
11 size_t DistanceMatrix::getNameIndex(const std::string& name) const
12 {
13  for (size_t i = 0; i < names_.size(); ++i)
14  {
15  if (names_[i] == name)
16  return i;
17  }
18  throw Exception("DistanceMatrix::getNameIndex. Name not found: '" + name + "'.");
19 }
This alphabet is used to deal NumericAlphabet.