X-Git-Url: http://git.megacz.com/?p=sbp.git;a=blobdiff_plain;f=src%2Fedu%2Fberkeley%2Fsbp%2FReduction.java;h=02667820c21f36ef6d4830dfbc0237ec9f462878;hp=5eb3f63197de7d91f644d1625e1fbf8443d469c2;hb=24219bdf084b45273e869cd19382d1640b396566;hpb=33d7b8fa4974bad96108c11e5548b354cf10ecb8 diff --git a/src/edu/berkeley/sbp/Reduction.java b/src/edu/berkeley/sbp/Reduction.java index 5eb3f63..0266782 100644 --- a/src/edu/berkeley/sbp/Reduction.java +++ b/src/edu/berkeley/sbp/Reduction.java @@ -9,9 +9,9 @@ final class Reduction implements Comparable { private Pos reduction; private GSS.Phase phase; private Forest forest; - private Node pred; + private StateNode pred; - public Reduction(Node pred, Pos reduction, Forest forest, GSS.Phase target) { + public Reduction(StateNode pred, Pos reduction, Forest forest, GSS.Phase target) { this.reduction = reduction; this.forest = forest; this.phase = target; @@ -40,7 +40,10 @@ final class Reduction implements Comparable { return 1; } - public void perform() { new Result(forest, pred, reduction, phase); } + public void perform() { + if (reduction==null) return; + phase.newNodeFromReduction(forest, reduction, pred); + } public GSS.Phase predPhase() { return pred.phase(); } public Pos reduction() { return reduction; } public GSS.Phase targetPhase() { return phase; }