forked from JavaTX/JavaCompilerCore
Zeitmessung für Clone
This commit is contained in:
parent
3601d11b0b
commit
70b804fc4a
@ -23,6 +23,7 @@ import com.rits.cloning.Cloner;
|
||||
import de.dhbwstuttgart.logger.Logger;
|
||||
import de.dhbwstuttgart.logger.Section;
|
||||
import de.dhbwstuttgart.logger.SectionLogger;
|
||||
import de.dhbwstuttgart.logger.Timestamp;
|
||||
import de.dhbwstuttgart.logger.Timewatch;
|
||||
import de.dhbwstuttgart.core.MyCompiler;
|
||||
import de.dhbwstuttgart.myexception.CTypeReconstructionException;
|
||||
@ -673,7 +674,7 @@ public class Unify
|
||||
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));
|
||||
undMenge.addAll(Eq1);
|
||||
undMenge.addAll(Unify.deepClone(Eq1));
|
||||
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:
|
||||
@ -691,8 +692,8 @@ public class Unify
|
||||
Menge<Pair> testMenge = new Menge<Pair>();
|
||||
//testMenge.addAll(cloner.deepClone(undMenge));
|
||||
//testMenge.addAll(cloner.deepClone(pairs));
|
||||
testMenge.addAll(undMenge);
|
||||
testMenge.addAll(pairs);
|
||||
testMenge.addAll(Unify.deepClone(undMenge));
|
||||
testMenge.addAll(Unify.deepClone(pairs));
|
||||
Menge<Menge<Pair>> test = Unify.unifyFiltered(testMenge, fc_tto, false);
|
||||
if(test.size()>0){
|
||||
filteredOCons.add(pairs);
|
||||
@ -3649,9 +3650,10 @@ tempKlasse.get_Superclass_Name() ); System.out.println( "P. S.:
|
||||
}
|
||||
|
||||
private static <A extends DeepCloneable> Menge<A> deepClone(Menge<A> m){
|
||||
|
||||
Timewatch watch = Timewatch.getTimewatch();
|
||||
Timestamp timer = watch.start("Unify - deepClone");
|
||||
Menge<A> ret = m.stream().<A>map((Function<A,A>)(x -> x.deepClone())).<Menge<A>>collect(Menge::new, Menge::add, Menge::addAll);
|
||||
|
||||
timer.stop();
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user