Skip to content

Commit

Permalink
Fix the bugfix. Increase offset.
Browse files Browse the repository at this point in the history
  • Loading branch information
prasser committed Jul 1, 2015
1 parent e7dc298 commit a70f212
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/main/org/deidentifier/arx/framework/data/DataManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -564,9 +564,10 @@ class TNode {
}

// Build nodes
int offset = dataAnalyzed.getDictionary().getMapping()[index].length;
for (int i = 0; i < hierarchy[0].length; i++) {
for (int j = 0; j < hierarchy.length; j++) {
final int nodeID = hierarchy[j][i] + i * hierarchy.length;
final int nodeID = hierarchy[j][i] + i * offset;
TNode curNode = null;

if (!nodes.containsKey(nodeID)) {
Expand All @@ -580,7 +581,7 @@ class TNode {
}

if (i > 0) { // first add child
curNode.children.add(hierarchy[j][i - 1] + (i - 1) * hierarchy.length);
curNode.children.add(hierarchy[j][i - 1] + (i - 1) * offset);
}
}
}
Expand Down

0 comments on commit a70f212

Please sign in to comment.