bpp-seq3  3.0.0
IntegerAlphabet.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 "AlphabetState.h"
6 #include "IntegerAlphabet.h"
7 
8 // From Utils:
9 #include <Bpp/Text/TextTools.h>
10 
11 using namespace bpp;
12 
13 IntegerAlphabet::IntegerAlphabet(unsigned int max) : MAX_(max)
14 {
15  // Alphabet content definition
16  registerState(new AlphabetState(-1, "-", "Gap"));
17 
18  for (int i = 0; i < static_cast<int>(MAX_); i++)
19  {
21  }
22 
23  registerState(new AlphabetState(static_cast<int>(MAX_), "?", "?"));
24 }
virtual void registerState(AlphabetState *st)
Add a state to the Alphabet.
This is the base class to describe states in an Alphabet.
Definition: AlphabetState.h:22
IntegerAlphabet(unsigned int max)
std::string toString(T t)
This alphabet is used to deal NumericAlphabet.