8
Copyright or © or Copr. CNRS, (November 17, 2004)
8
Copyright or © or Copr. Bio++ Development Team, (November 17, 2004)
10
10
This software is a computer program whose purpose is to provide classes
11
11
for population genetics analysis.
13
13
This software is governed by the CeCILL license under French law and
14
abiding by the rules of distribution of free software. You can use,
14
abiding by the rules of distribution of free software. You can use,
15
15
modify and/ or redistribute the software under the terms of the CeCILL
16
16
license as circulated by CEA, CNRS and INRIA at the following URL
17
"http://www.cecill.info".
17
"http://www.cecill.info".
19
19
As a counterpart to the access to the source code and rights to copy,
20
20
modify and redistribute granted by the license, users are provided only
21
21
with a limited warranty and the software's author, the holder of the
22
22
economic rights, and the successive licensors have only limited
25
25
In this respect, the user's attention is drawn to the risks associated
26
26
with loading, using, modifying and/or developing or reproducing the
29
29
therefore means that it is reserved for developers and experienced
30
30
professionals having in-depth computer knowledge. Users are therefore
31
31
encouraged to load and test the software's suitability as regards their
32
requirements in conditions enabling the security of their systems and/or
33
data to be ensured and, more generally, to use and operate it in the
34
same conditions as regards security.
32
requirements in conditions enabling the security of their systems and/or
33
data to be ensured and, more generally, to use and operate it in the
34
same conditions as regards security.
36
36
The fact that you are presently reading this means that you have had
37
37
knowledge of the CeCILL license and that you accept its terms.
39
39
// Secured inclusion of header's file
40
40
#ifndef _MULTIALLELEMONOLOCUSGENOTYPE_H_
41
41
#define _MULTIALLELEMONOLOCUSGENOTYPE_H_
46
46
#include <Bpp/Exceptions.h>
49
49
#include "MonolocusGenotype.h"
55
* @brief The MultiAlleleMonolocusGenotype class.
57
* This class is intended to handle monolocus genotype with many alleles
58
* like polyploid loci or loci obtained by trace file without cutoff on
59
* peaks or other filter.
61
* @author Sylvain Gaillard
63
class MultiAlleleMonolocusGenotype:
64
public MonolocusGenotype
67
std::vector<unsigned int> allele_index_;
69
public: // Constructors and destructor
72
* @brief Build a monolocus genotype containing many alleles.
74
MultiAlleleMonolocusGenotype(std::vector<unsigned int> allele_index);
77
* @brief Copy constructor.
79
MultiAlleleMonolocusGenotype(const MultiAlleleMonolocusGenotype& mmg);
82
* @brief Destroy the MultiAlleleMonolocusGenotype.
84
~MultiAlleleMonolocusGenotype();
86
public: // Other methodes
88
* @brief The affectation operator.
90
MultiAlleleMonolocusGenotype& operator= (const MultiAlleleMonolocusGenotype& mmg);
93
* @brief The == operator.
95
bool operator== (const MultiAlleleMonolocusGenotype& mmg) const;
98
* @brief Test the homozygozity of the locus (i.e. all allele are identical).
100
bool isHomozygous() const;
103
* @name The MonolocusGenotype interface:
107
std::vector<unsigned int> getAlleleIndex() const;
111
* @name The Clonable interface:
115
MultiAlleleMonolocusGenotype* clone() const;
119
} //end of namespace bpp;
54
* @brief The MultiAlleleMonolocusGenotype class.
56
* This class is intended to handle monolocus genotype with many alleles
57
* like polyploid loci or loci obtained by trace file without cutoff on
58
* peaks or other filter.
60
* @author Sylvain Gaillard
62
class MultiAlleleMonolocusGenotype :
63
public MonolocusGenotype
66
std::vector<size_t> allele_index_;
69
// Constructors and destructor
71
* @brief Build a monolocus genotype containing many alleles.
73
MultiAlleleMonolocusGenotype(std::vector<size_t> allele_index);
76
* @brief Copy constructor.
78
MultiAlleleMonolocusGenotype(const MultiAlleleMonolocusGenotype& mmg);
81
* @brief Destroy the MultiAlleleMonolocusGenotype.
83
~MultiAlleleMonolocusGenotype();
88
* @brief The affectation operator.
90
MultiAlleleMonolocusGenotype& operator=(const MultiAlleleMonolocusGenotype& mmg);
93
* @brief The == operator.
95
bool operator==(const MultiAlleleMonolocusGenotype& mmg) const;
98
* @brief Test the homozygozity of the locus (i.e. all allele are identical).
100
bool isHomozygous() const;
103
* @name The MonolocusGenotype interface:
107
std::vector<size_t> getAlleleIndex() const;
111
* @name The Clonable interface:
115
MultiAlleleMonolocusGenotype* clone() const;
118
} // end of namespace bpp;
121
120
#endif // _MULTIALLELEMONOLOCUSGENOTYPE_H_