fixed flattening of sets

This commit is contained in:
Florian Steurer 2016-04-12 13:21:17 +02:00
parent b0aeaae80e
commit ff0d1e907f

View File

@ -97,7 +97,12 @@ public class Unify {
Set<List<Set<UnifyPair>>> cartResult = setOps.cartesianProduct(secondLevelSetList);
Set<Set<UnifyPair>> flat = new HashSet<>();
cartResult.stream().forEach(x -> flat.addAll(x));
for(List<Set<UnifyPair>> s : cartResult) {
Set<UnifyPair> flat1 = new HashSet<>();
for(Set<UnifyPair> s1 : s)
flat1.addAll(s1);
flat.add(flat1);
}
topLevelSets.add(flat);
}