-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathchromosome.h
46 lines (44 loc) · 1.2 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
#ifndef CHROMOSOME_H
#define CHROMOSOME_H
#include<vector>
#include<algorithm>
#include<ctime>
#include <cstdlib>
#include<map>
#include "testsequence.h"
class Chromosome
{
public:
/** Default constructor */
Chromosome();
/** Copy constructor
* \param other Object to copy from
*/
Chromosome(const Chromosome& other);
bool operator < (const Chromosome&) const;
void generate(vector<TestSequence>,int);
void create(vector<TestSequence>);
void setSequence(vector<TestSequence>);
vector<TestSequence> getSequence() const;
void setFitness(double);
void setWeight(int);
void setCount(int);
void setSize(int);
void setMessageCount(int);
void evalConditions();
double getFitness()const;
int getWeight() const;
int getCount()const;
int getSize()const;
int getMessageCount()const;
map<string,int> getConditionHash()const;
private:
vector<TestSequence> TSList;
map<string,int> conditions;
int TestCaseCount;
int TotalWeight;
double fitness;
int mcount;
int size;
};
#endif // CHROMOSOME_H