diff --git a/src/main/java/ch/idsia/crema/inference/approxlp1/Neighbourhood.java b/src/main/java/ch/idsia/crema/inference/approxlp1/Neighbourhood.java index f476b92b..9a98218e 100644 --- a/src/main/java/ch/idsia/crema/inference/approxlp1/Neighbourhood.java +++ b/src/main/java/ch/idsia/crema/inference/approxlp1/Neighbourhood.java @@ -62,10 +62,10 @@ public Solution move(Solution from, Move doing) { private BayesianFactor random(GenericFactor factor) { if (factor instanceof ExtensiveLinearFactor) { return new ExtensiveLinearToRandomBayesian().apply((ExtensiveLinearFactor) factor); - } else if (factor instanceof SeparateHalfspaceFactor) { - return new HalfspaceToRandomBayesianFactor().apply((SeparateHalfspaceFactor) factor); } else if (factor instanceof SeparateLinearFactor) { return new SeparateLinearToRandomBayesian().apply((SeparateLinearFactor) factor); + } else if (factor instanceof SeparateHalfspaceFactor) { + return new HalfspaceToRandomBayesianFactor().apply((SeparateHalfspaceFactor) factor); } else if (factor instanceof BayesianFactor) { return (BayesianFactor) factor; }