.log-Dateien zu gitignore hinzufügen. Filter in Unify verbessern
This commit is contained in:
parent
c3a8567e3f
commit
38176163d5
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,6 +1,7 @@
|
||||
CVS
|
||||
bin
|
||||
*.class
|
||||
*.log
|
||||
|
||||
# Mobile Tools for Java (J2ME)
|
||||
.mtj.tmp/
|
||||
|
@ -665,29 +665,34 @@ public class Unify
|
||||
|
||||
if(filter){
|
||||
Cloner cloner = new Cloner();
|
||||
Menge<Menge<Menge<Pair>>> temp = new Menge<>();
|
||||
Menge<Menge<Menge<Pair>>> temp = new Menge<>(); //hier werden gefilterte Constraints gesammelt
|
||||
Menge<Pair> undMenge = new Menge<Pair>(); //Die Menge von Pairs, welche in jedem Kartesischen Produkt enthalten sind.
|
||||
undMenge.addAll(cloner.deepClone(Eq1));
|
||||
for (Menge<Menge<Pair>> vecvecpair : cartProduktSets){
|
||||
Menge<Menge<Pair>> temp2 = new Menge<>();
|
||||
Menge<Menge<Menge<Pair>>> oderConstraints = new Menge<>();//Die zu filternden Constraints
|
||||
for (Menge<Menge<Pair>> vecvecpair : cartProduktSets){
|
||||
if(vecvecpair.size() == 1){//gibt es nur eine UndMenge in diesem Set, dann kommt diese in jedem Karthesischen Produkt vor:
|
||||
undMenge.addAll(cloner.deepClone(vecvecpair.firstElement()));
|
||||
temp2 = vecvecpair;
|
||||
temp.add(vecvecpair);
|
||||
}else{//gibt es mehrere Mengen, kann gefiltert werden:
|
||||
for(Menge<Pair> pairs : vecvecpair){
|
||||
Menge<Pair> testMenge = new Menge<Pair>();
|
||||
testMenge.addAll(cloner.deepClone(undMenge));
|
||||
testMenge.addAll(cloner.deepClone(pairs));
|
||||
Menge<Menge<Pair>> test = Unify.unifyFiltered(testMenge, fc_tto, false);
|
||||
if(test.size()>0){
|
||||
temp2.add(pairs);
|
||||
}
|
||||
else{
|
||||
log.debug("Ausgesondertes Constraint: "+pairs);
|
||||
}
|
||||
}
|
||||
oderConstraints.add(vecvecpair); //die Menge zu den zu filternden OderConstraints anfügen
|
||||
}
|
||||
temp.add(temp2);
|
||||
}
|
||||
//Filtere die OderConstraints:
|
||||
for(Menge<Menge<Pair>> oderConstraint : oderConstraints){
|
||||
Menge<Menge<Pair>> filteredOCons = new Menge<>(); //diese Menge sammelt nur Cons
|
||||
for(Menge<Pair> pairs : oderConstraint){
|
||||
Menge<Pair> testMenge = new Menge<Pair>();
|
||||
testMenge.addAll(cloner.deepClone(undMenge));
|
||||
testMenge.addAll(cloner.deepClone(pairs));
|
||||
Menge<Menge<Pair>> test = Unify.unifyFiltered(testMenge, fc_tto, false);
|
||||
if(test.size()>0){
|
||||
filteredOCons.add(pairs);
|
||||
}
|
||||
else{
|
||||
log.debug("Ausgesondertes Constraint: "+pairs);
|
||||
}
|
||||
}
|
||||
temp.add(filteredOCons);
|
||||
}
|
||||
SetView<Menge<Menge<Pair>>> difference = Sets.difference(cartProduktSets, temp);
|
||||
log.debug("Ausgelöschte Constraints: "+difference.toString());
|
||||
|
Loading…
Reference in New Issue
Block a user