bpp-seq  2.2.0
AlphabetIndex1.h
Go to the documentation of this file.
1 //
2 // File: AlphabetIndex1.h
3 // Created by: Julien Dutheil
4 // Created on: Mon Feb 21 17:42 2005
5 //
6 
7 /*
8  Copyright or © or Copr. Bio++ Development Team, (November 17, 2004)
9 
10  Julien.Dutheil@univ-montp2.fr
11 
12  This software is a computer program whose purpose is to provide classes
13  for sequences analysis.
14 
15  This software is governed by the CeCILL license under French law and
16  abiding by the rules of distribution of free software. You can use,
17  modify and/ or redistribute the software under the terms of the CeCILL
18  license as circulated by CEA, CNRS and INRIA at the following URL
19  "http://www.cecill.info".
20 
21  As a counterpart to the access to the source code and rights to copy,
22  modify and redistribute granted by the license, users are provided only
23  with a limited warranty and the software's author, the holder of the
24  economic rights, and the successive licensors have only limited
25  liability.
26 
27  In this respect, the user's attention is drawn to the risks associated
28  with loading, using, modifying and/or developing or reproducing the
29  software by the user in light of its specific status of free software,
30  that may mean that it is complicated to manipulate, and that also
31  therefore means that it is reserved for developers and experienced
32  professionals having in-depth computer knowledge. Users are therefore
33  encouraged to load and test the software's suitability as regards their
34  requirements in conditions enabling the security of their systems and/or
35  data to be ensured and, more generally, to use and operate it in the
36  same conditions as regards security.
37 
38  The fact that you are presently reading this means that you have had
39  knowledge of the CeCILL license and that you accept its terms.
40  */
41 
42 #ifndef _ALPHABETINDEX1_H_
43 #define _ALPHABETINDEX1_H_
44 
45 #include "../Alphabet/Alphabet.h"
46 #include <Bpp/Clonable.h>
47 
48 // From the STL:
49 #include <string>
50 
51 namespace bpp
52 {
59  public virtual Clonable
60 {
61 public:
63  virtual ~AlphabetIndex1() {}
64 
65 public:
66  virtual AlphabetIndex1* clone() const = 0;
67 
74  virtual double getIndex(int state) const = 0;
75 
82  virtual double getIndex(const std::string& state) const = 0;
83 
89  virtual const Alphabet* getAlphabet() const = 0;
90 
94  virtual std::vector<double>* getIndexVector() const = 0;
95 };
96 } // end of namespace bpp.
97 
98 #endif // _ALPHABETINDEX1_H_
99 
This alphabet is used to deal NumericAlphabet.
virtual AlphabetIndex1 * clone() const =0
The Alphabet interface.
Definition: Alphabet.h:130
One dimensionnal alphabet index interface.
virtual std::vector< double > * getIndexVector() const =0
virtual ~AlphabetIndex1()
virtual const Alphabet * getAlphabet() const =0
Get the alphabet associated to this index.
virtual double getIndex(int state) const =0
Get the index associated to a state.