-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBool_Functions.cpp
51 lines (34 loc) · 999 Bytes
/
Bool_Functions.cpp
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
using std::cout;
using std::cin;
using std::endl;
using std::vector;
#define Positive 1
#define Negative 2
#define DC 3
#define Zero 0
#define Vec_2D vector<vector<int>>
Vec_2D And_Function(Vec_2D Pol_Comp_i, int cofactor, int Size, int No, int type){
if( type == 1){
for(int i = 0; i < Pol_Comp_i.size(); i++){
if(Pol_Comp_i[i][cofactor] == DC){
Pol_Comp_i[i][cofactor] = Positive;
}
}
}
//Negative Cofactor
else if( type == 0 ){
// cout << endl << No << endl << Size << endl;
for(int i = 0; i < Pol_Comp_i.size(); i++){
if(Pol_Comp_i[i][cofactor] == DC){
Pol_Comp_i[i][cofactor] = Negative;
}
}
}
return Pol_Comp_i;
}
Vec_2D Or_Function(Vec_2D Pos_Cofactor, Vec_2D Neg_Cofactor){
for(int i = 0; i < Neg_Cofactor.size(); i++){
Pos_Cofactor.push_back(Neg_Cofactor[i]);
}
return Pos_Cofactor;
}