forked from sgusev/GERMLINE
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Chromosome.h
48 lines (36 loc) · 1.24 KB
/
Chromosome.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
// Chromosome.h.haplotyped markers for a chromosome
#ifndef CHROMOSOME_H
#define CHROMOSOME_H
#include "BasicDefinitions.h"
#include "MarkerSet.h"
#include <vector>
using namespace std;
class Chromosome
{
public:
// Chromosome(): default constructor
// Precondition: None.
// Postcondition: chromosome is empty. maxSets is 0.
Chromosome();
// getMarkerSet(): accessor for MarkerSet objects.
// Precondition: None.
// Postcondition: If index refers to an index for which memory has been
// allocated, then the MarkerSet at position index has been returned;
// otherwise a warning is printed and the default MarkerSet is returned.
MarkerSet* getMarkerSet();
MarkerSet* getMarkerSet(unsigned int);
// addMarkerSet(): adds a MarkerSet
// Precondition: None.
// Postcondition: If chromosome does not yet have maxSets MarkerSet objects,
// then ms is added to the end of chromosome; otherwise a warning is printed.
void addMarkerSet(MarkerSet * ms);
void clear();
void print(ostream& out,unsigned int,unsigned int);
void print_snps(ostream& out, unsigned int, unsigned int);
private:
// Storage for chromosome MarkerSet objects
vector<MarkerSet * > chromosome;
};
ostream &operator<<(ostream &fout, Chromosome&);
#endif
// end Chromosome.h