From 1b039a3b03e534c34a2f2beb723f22f2bd278c35 Mon Sep 17 00:00:00 2001 From: bdemsky Date: Fri, 24 Feb 2012 22:30:21 +0000 Subject: [PATCH] change example for now... --- Robust/src/Benchmarks/oooJava/simplebh/TestRunner.java | 2 ++ .../src/Benchmarks/oooJava/simplebh/TreeIndexNode.java | 9 ++------- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/Robust/src/Benchmarks/oooJava/simplebh/TestRunner.java b/Robust/src/Benchmarks/oooJava/simplebh/TestRunner.java index 10cbdffb..9de5c21b 100644 --- a/Robust/src/Benchmarks/oooJava/simplebh/TestRunner.java +++ b/Robust/src/Benchmarks/oooJava/simplebh/TestRunner.java @@ -45,6 +45,8 @@ public class TestRunner { } private void insert(TreeIndexGraph tree, TreeIndexNode nn, LeafNodeData leafNodeData) { + if (nn.children==null) + nn.children=new TreeIndexNode[2]; if (nn.children[0] == null) { TreeIndexNode newNode = tree.createNode(leafNodeData); tree.addNode(newNode); diff --git a/Robust/src/Benchmarks/oooJava/simplebh/TreeIndexNode.java b/Robust/src/Benchmarks/oooJava/simplebh/TreeIndexNode.java index 4224068c..a60a9d52 100644 --- a/Robust/src/Benchmarks/oooJava/simplebh/TreeIndexNode.java +++ b/Robust/src/Benchmarks/oooJava/simplebh/TreeIndexNode.java @@ -10,7 +10,6 @@ public class TreeIndexNode { public TreeIndexNode(LeafNodeData data) { this.data = data; - this.children = new TreeIndexNode[2]; } public void advance() { @@ -31,12 +30,8 @@ public class TreeIndexNode { if (nn.data == null) { // nn is cell - if (nn.children[0] != null) { - recurseForce(nn.children[0]); - } - - if (nn.children[1] != null) { - recurseForce(nn.children[1]); + for(int i=0;i