comparison egglib/egglib-2.1.5/include/egglib-cpp/Current.hpp @ 1:420b57c3c185 draft

Uploaded
author dereeper
date Fri, 10 Jul 2015 04:39:30 -0400
parents
children
comparison
equal deleted inserted replaced
0:3e19d0dfcf3e 1:420b57c3c185
1 /*
2 Copyright 2009-2010 Stéphane De Mita, Mathieu Siol
3
4 This file is part of the EggLib library.
5
6 EggLib is free software: you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation, either version 3 of the License, or
9 (at your option) any later version.
10
11 EggLib is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with EggLib. If not, see <http://www.gnu.org/licenses/>.
18 */
19
20 #ifndef EGGLIB_CURRENT_HPP
21 #define EGGLIB_CURRENT_HPP
22
23
24 namespace egglib {
25
26 class Population;
27 class ParamSet;
28
29 /** \brief Represents the current set of populations
30 *
31 * \ingroup coalesce
32 *
33 */
34 class Current {
35
36 public:
37
38 /** \brief Default constructor
39 *
40 */
41 Current();
42
43 /** \brief Standard constructor
44 *
45 * \param paramSet allows to initiate the correct structure
46 * of populations.
47 *
48 */
49 Current(ParamSet* paramSet);
50
51 /** \brief Rebuilds the object
52 *
53 * \param paramSet allows to initiate the correct structure
54 * of populations.
55 *
56 */
57 void reset(ParamSet* paramSet);
58
59 /** \brief Destructor
60 *
61 */
62 virtual ~Current();
63
64 /** \brief Copy constructor
65 *
66 */
67 Current(const Current&);
68
69 /** \brief Assignment operator
70 *
71 */
72 Current& operator=(const Current&);
73
74 /** \brief Gets the current number of populations
75 *
76 */
77 unsigned int numberOfPopulations() const;
78
79
80 /** \brief Adds an empty population to the system
81 *
82 */
83 void addPopulation();
84
85
86 /** \brief Gets the number of lineages contained by a given
87 * population
88 *
89 */
90 unsigned int populationNumberOfLineages(unsigned int populationIndex) const;
91
92
93 /** \brief Provides access to a given population
94 *
95 * The returned pointer can be used to modify the object.
96 *
97 */
98 Population* population(unsigned int populationIndex);
99
100
101 /** \brief Total number of lineages
102 *
103 */
104 unsigned int totalNumberOfLineages() const;
105
106
107 /** \brief Efficient number of lineages
108 *
109 * This sums the number of covered segments of each lineage.
110 *
111 */
112 unsigned int efficientNumberOfLineages() const;
113
114
115 private:
116
117 void setPopulationArray();
118 void copy(const Current&);
119 void clear();
120
121 unsigned int _numberOfPopulations;
122 unsigned int _numberOfSegments;
123 Population** populations;
124 };
125
126 }
127
128 #endif