annotate egglib/egglib-2.1.5/include/egglib-cpp/CharMatrix.hpp @ 15:31c23d943c29 draft default tip

Uploaded
author dereeper
date Tue, 08 Jan 2019 08:47:56 -0500
parents 420b57c3c185
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
1 /*
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
2 Copyright 2009 Stéphane De Mita, Mathieu Siol
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
3
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
4 This file is part of the EggLib library.
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
5
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
6 EggLib is free software: you can redistribute it and/or modify
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
7 it under the terms of the GNU General Public License as published by
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
8 the Free Software Foundation, either version 3 of the License, or
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
9 (at your option) any later version.
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
10
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
11 EggLib is distributed in the hope that it will be useful,
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
14 GNU General Public License for more details.
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
15
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
16 You should have received a copy of the GNU General Public License
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
17 along with EggLib. If not, see <http://www.gnu.org/licenses/>.
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
18 */
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
19
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
20 #ifndef EGGLIB_CHARMATRIX_HPP
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
21 #define EGGLIB_CHARMATRIX_HPP
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
22
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
23
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
24 namespace egglib {
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
25
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
26 /** \brief Interface for classes usable as a square matrix of characters
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
27 *
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
28 * \ingroup core
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
29 *
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
30 */
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
31 class CharMatrix {
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
32
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
33 public:
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
34
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
35 /** \brief Gets number of rows or sequences
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
36 *
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
37 */
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
38 virtual unsigned int numberOfSequences() const = 0;
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
39
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
40
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
41 /** \brief Gets number of columns or sites
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
42 *
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
43 */
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
44 virtual unsigned int numberOfSites() const = 0;
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
45
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
46
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
47 /** \brief Gets the character at a given position
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
48 *
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
49 * The accessor should be "fast" and does not guarantee to
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
50 * perform out-of-bounds checks
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
51 *
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
52 */
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
53 virtual char character(unsigned int sequence, unsigned int site) const = 0;
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
54
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
55
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
56 /** \brief Gets population index
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
57 *
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
58 */
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
59 virtual unsigned int populationLabel(unsigned int row) const = 0;
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
60
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
61
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
62 /** \brief Get site position
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
63 *
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
64 */
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
65 virtual double sitePosition(unsigned int column) const = 0;
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
66
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
67 };
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
68 }
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
69
420b57c3c185 Uploaded
dereeper
parents:
diff changeset
70 #endif