# | Line 1 | Line 1 | |
---|---|---|
1 | #include <iostream> | |
2 | < | #include <cstdlib> |
2 | > | #include <stdlib.h> |
3 | ||
4 | ||
5 | #include "Exclude.hpp" | |
# | Line 8 | Line 8 | Exclude::Exclude( int theIndex ){ | |
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; | |
18 | – | std::cerr << "nExcludes = " << nExcludes << "\n"; |
20 | exPairs = new int[nExcludes*2]; | |
21 | } | |
22 | ||
# | Line 23 | Line 24 | void Exclude::destroyArray( void ){ | |
24 | delete[] exPairs; | |
25 | } | |
26 | ||
27 | + | void Exclude::printMe( void ){ |
28 | + | |
29 | + | std::cerr << "exclude[" << index << "] i, j: " << exPairs[exI] << " - " << exPairs[exJ] << "\n"; |
30 | + | } |
31 | + | |
32 | void Exclude::setPair( int i, int j ){ | |
33 | exPairs[exI] = i; | |
34 | exPairs[exJ] = j; |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |