-
Notifications
You must be signed in to change notification settings - Fork 7
/
MatchesBuilder.h
69 lines (55 loc) · 2.09 KB
/
MatchesBuilder.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
// MatchesBuilder.h: builds matches from individuals
#ifndef MATCHESBUILDER_H
#define MATCHESBUILDERs_H
#include "BasicDefinitions.h"
#include "Individuals.h"
#include "MatchFactory.h"
#include "PolymorphicIndividualsExtractor.h"
#include "WindowsList.h"
#include <sstream>
#include <iostream>
class MatchesBuilder
{
public:
// MatchesBuilder(): default constructor
// Precondition: None.
// Postcondition: individualsP and matchesP are
// set to NULL.
MatchesBuilder( PolymorphicIndividualsExtractor* );
// buildMatches(): builds matches from individuals
// Precondition: None.
// Postcondition: mats contains all matches from inds;
// individualsP points to inds; matchesP points to mats.
void buildMatches();
void printAllMatches();
void printHaplotypes(string);
unsigned long long calculateMemData();
private:
// matchAllMarkers(): builds matches for individuals considering all markers.
// Precondition: individualsP points to a valid Individuals object and matchesP
// points to a valid Matches object.
// Postcondition: matchesP points to a valid Matches object containing
// all matches for individuals considering all markers
void matchAllMarkers();
void readAllMarkers();
// matchMarkerSet(): builds matches for individuals considering markers in marker set.
// Precondition: individualsP points to a valid Individuals object and matchesP
// points to a valid Matches object.
// Postcondition: matchesP points to a valid Matches object containing all
// matches for individuals considering markers in marker set markerSetPosition,
// extending existing matches whenever possible.
void matchMarkerSet();
void appendMarkerSet(unsigned int, int);
void readMarkerSet(unsigned int , unsigned int );
void readHaploidMarkerSet();
void readMatchMarkerSet();
// pointer to individuals
Individuals * individualsP;
// generates matches
MatchFactory matchFactory;
// pie to extract each word independantly
PolymorphicIndividualsExtractor* pieP;
unsigned int ms_start, ms_end;
};
#endif
// end MatchesBuilder.h