Egglib 2.1.11
C++ library reference manual
Current.hpp
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 
34  class Current {
35 
36  public:
37 
41  Current();
42 
49  Current(ParamSet* paramSet);
50 
57  void reset(ParamSet* paramSet);
58 
62  virtual ~Current();
63 
67  Current(const Current&);
68 
72  Current& operator=(const Current&);
73 
77  unsigned int numberOfPopulations() const;
78 
79 
83  void addPopulation();
84 
85 
90  unsigned int populationNumberOfLineages(unsigned int populationIndex) const;
91 
92 
98  Population* population(unsigned int populationIndex);
99 
100 
104  unsigned int totalNumberOfLineages() const;
105 
106 
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
unsigned int efficientNumberOfLineages() const
Efficient number of lineages.
Definition: Current.cpp:135
Current()
Default constructor.
Definition: Current.cpp:44
Represents the current set of populations.
Definition: Current.hpp:34
virtual ~Current()
Destructor.
Definition: Current.cpp:100
unsigned int populationNumberOfLineages(unsigned int populationIndex) const
Gets the number of lineages contained by a given population.
Definition: Current.cpp:120
void reset(ParamSet *paramSet)
Rebuilds the object.
Definition: Current.cpp:58
Handles a single population.
Definition: Population.hpp:35
Population * population(unsigned int populationIndex)
Provides access to a given population.
Definition: Current.cpp:144
void addPopulation()
Adds an empty population to the system.
Definition: Current.cpp:110
unsigned int numberOfPopulations() const
Gets the current number of populations.
Definition: Current.cpp:105
Definition: ABC.cpp:37
Set of parameters.
Definition: ParamSet.hpp:38
Current & operator=(const Current &)
Assignment operator.
Definition: Current.cpp:73
unsigned int totalNumberOfLineages() const
Total number of lineages.
Definition: Current.cpp:126

Hosted by 
Get EggLib at SourceForge.net. Fast, secure and Free Open Source software downloads