-
Notifications
You must be signed in to change notification settings - Fork 1
/
Blocking.h
68 lines (52 loc) · 2.05 KB
/
Blocking.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
#ifndef _BLOCKING_
#define _BLOCKING_
#include "Node.h"
class Individual;
class Blocking
{
public:
Blocking();
bool equals(Individual* pX, Individual* pY);
bool subset(Individual* pX, Individual* pY);
bool isBlocked(Individual* pX);
virtual bool isDirectlyBlocked(Individual* pX, Nodes* pAncestors) = 0;
virtual bool isIndirectlyBlocked(Individual* pX);
virtual bool isIndirectlyBlocked(Nodes* pAncestors);
};
/********************************************************************/
/********************************************************************/
/********************************************************************/
class SubsetBlocking : public Blocking
{
public:
SubsetBlocking() {}
virtual bool isDirectlyBlocked(Individual* pX, Nodes* pAncestors);
};
/********************************************************************/
/********************************************************************/
/********************************************************************/
class DoubleBlocking : public Blocking
{
public:
DoubleBlocking() {}
bool isDirectlyBlocked(Individual* pX, Nodes* pAncestors);
};
/********************************************************************/
/********************************************************************/
/********************************************************************/
class OptimizedDoubleBlocking : public Blocking
{
public:
OptimizedDoubleBlocking(){}
virtual bool isDirectlyBlocked(Individual* pX, Nodes* pAncestors);
bool block1(Individual* pW, Individual* pW1);
bool block2(Individual* pW, Individual* pV, Individual* pW1);
bool block3(Individual* pW, Individual* pV, Individual* pW1);
bool block4(Individual* pW, Individual* pV, Individual* pW1);
bool block5(Individual* pW, Individual* pV, Individual* pW1);
bool block6(Individual* pW, Individual* pW1);
};
/********************************************************************/
/********************************************************************/
/********************************************************************/
#endif