byte[][][][][] newClusterIds = new byte[Card.NUM_CARDS+1]
[Card.NUM_CARDS+1]
[Card.NUM_CARDS+1]
[Card.NUM_CARDS+1]
[Card.NUM_CARDS+1];
HandRecordClusterId hr2;
double arrayPopulateTimer = System.currentTimeMillis();
int numEntriesToPopulate = Constants.choose(Card.NUM_CARDS-2, numBoardCards2);
int modVal = (int)Math.floor(numEntriesToPopulate/100);
if(isFiveBcs) {
int counter = 0;
int percent = 0;
while((hr2 = in2.readRecord()) != null) {
byte[] boardCards2Copy = hr2.boardCards;
newClusterIds[boardCards2Copy[0]]
[boardCards2Copy[1]]
[boardCards2Copy[2]]
[boardCards2Copy[3]]
[boardCards2Copy[4]] = hr2.clusterId;
if(++counter % modVal == 0) {
// System.out.println(" " + (percent++) + "% done populating array");
}
}
} else {
while((hr2 = in2.readRecord()) != null) {
byte[] boardCards2Copy = new byte[5];
for(int i = 0; i < numBoardCards2; i++) {
boardCards2Copy[i] = hr2.boardCards[i];
}
for(int i = numBoardCards2; i < 5; i++) {
boardCards2Copy[i] = Card.NUM_CARDS;
}
newClusterIds[boardCards2Copy[0]]
[boardCards2Copy[1]]
[boardCards2Copy[2]]
[boardCards2Copy[3]]
[boardCards2Copy[4]] = hr2.clusterId;
}
}
// System.out.println(" load array: " +
// (System.currentTimeMillis() - arrayPopulateTimer));
// ------------------------------------------------------------
// create output
// ------------------------------------------------------------
// for each (50 choose numBoardCards1) ...
// print clusterId for numBoardCards1
// loop through all possible (50 choose numBoardCards2) boardcards,
// merge each one with our holecards to get the candidates for the
// next card-turn. For each of those, look up the cluster ID for
// these holecards and print that out
HandRecordClusterId hr1;
// each output sequence (for each boardCard config) will now:
// 1) be the same length
// 2) be in the same order, given the boardcards
// output cluster ID will only be Byte.MAX_VALUE if the newly delt