1 |
+ |
#include <iostream> |
2 |
|
#include <cstdlib> |
3 |
|
|
4 |
+ |
|
5 |
|
#include "Exclude.hpp" |
6 |
|
|
5 |
– |
int* Exclude::exPair |
7 |
|
int Exclude::nExcludes; |
8 |
+ |
int* Exclude::exPairs; |
9 |
|
|
10 |
|
Exclude::Exclude( int theIndex ){ |
11 |
< |
exI = theIndex*2; |
12 |
< |
exJ = theIndex*2 + 1; |
11 |
> |
|
12 |
> |
index = theIndex; |
13 |
> |
exI = index*2; |
14 |
> |
exJ = index*2 + 1; |
15 |
|
} |
16 |
|
|
17 |
|
void Exclude::createArray( int the_nExcludes ){ |
18 |
|
|
19 |
|
nExcludes = the_nExcludes; |
20 |
+ |
std::cerr << "nExcludes = " << nExcludes << "\n"; |
21 |
|
exPairs = new int[nExcludes*2]; |
22 |
|
} |
23 |
|
|
25 |
|
delete[] exPairs; |
26 |
|
} |
27 |
|
|
28 |
+ |
void Exclude::printMe( void ){ |
29 |
+ |
|
30 |
+ |
std::cerr << "exclude[" << index << "] i, j: " << exPairs[exI] << " - " << exPairs[exJ] << "\n"; |
31 |
+ |
} |
32 |
+ |
|
33 |
|
void Exclude::setPair( int i, int j ){ |
34 |
|
exPairs[exI] = i; |
35 |
|
exPairs[exJ] = j; |