Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -379,30 +379,30 @@ public void join(
private Map<Byte, HashSet<Byte>> createReprojectMap(
final Byte[] buildSide,
final Byte[] testSide,
final HashSet<Byte> sharedTiers) {
final Map<Byte, HashSet<Byte>> resultMap = Maps.newHashMap();
final int testLastIndex = testSide.length;
for (final Byte tierLeft : buildSide) {
final int firstGreater = Arrays.binarySearch(testSide, tierLeft);

if (firstGreater >= 0) {
// Found in array
sharedTiers.add(tierLeft);
}

final int insertionPoint = Math.abs(firstGreater);
if (insertionPoint >= testLastIndex) {
// Not present in array, and none greater than this value
continue;
final HashSet<Byte> sharedTiers)
{
final Map<Byte, HashSet<Byte>> resultMap = Maps.newHashMap();
final int testLastIndex = testSide.length;
for (final Byte tierLeft : buildSide)
{
final int firstGreater = Arrays.binarySearch(testSide, tierLeft);
//add same tier id
if (firstGreater >= 0) {
// Found in array
sharedTiers.add(tierLeft);
}
//add highter tier id
HashSet<Byte> higherTiers = Sets.newHashSet();
for(Byte testID :testSide)
{
if(testID>tierLeft)
{
higherTiers.add(testID);
}
}
resultMap.put(tierLeft, higherTiers);
}

// There is at least one value greater than the current copy it and
// add to map
final HashSet<Byte> higherTiers =
Sets.newHashSet(Arrays.copyOfRange(testSide, insertionPoint, testLastIndex));
resultMap.put(tierLeft, higherTiers);
}
return resultMap;
return resultMap;
}

private void setBufferAmount(final double bufferAmount) {
Expand Down