-
Notifications
You must be signed in to change notification settings - Fork 7
/
MatchFactory.h
46 lines (33 loc) · 1013 Bytes
/
MatchFactory.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
// MatchFactory.h: Generates matches from individuals
#ifndef MATCHFACTORY_H
#define MATCHFACTORY_H
#include "MarkerSet.h"
#include "Individual.h"
#include <map>
#include <vector>
using namespace std;
class MatchFactory
{
public:
// MatchFactory(): default constructor
// Precondition: None.
// Postcondition: segments and matches are empty and position is -1.
MatchFactory();
int size();
// initialize(): initializes object
// Precondition: None.
// Postcondition: If 0=<pos, then position is set to pos and map is empty;
// otherwise an error message is printed.
void initialize();
void hash(Individual *);
void assertShares();
unsigned long long calculateMem();
unsigned long long calculateMemData();
unsigned long long Nchoose2(unsigned int);
private:
// stores data to check for matches
map < boost::dynamic_bitset<> , Share > segments;
map < boost::dynamic_bitset<> , Share >::iterator iter;
};
#endif
// end MatchFactory.h