IncrementalPM/src/conformance/traceAnalysis/IncrementalTraceAnalyzer.java
protected boolean approximateConformance(XTrace trace, PetrinetGraph net, XAttributeMap logAttributes, Replayer replayer) {
		XLog traceAsLog=new XLogImpl(logAttributes);
		traceAsLog.add(trace);
		Pair<TraceAnalysisResult<T>, TraceEditDistance> referenceTraceInformation = mostSimilarTrace(trace);
		if(kSimilar(trace, referenceTraceInformation)) {
			List<T> potentialResults = determineConformanceApproximations(trace, referenceTraceInformation, logAttributes);
			for (T candidate : potentialResults) {
				if (this.conformanceCalculator.quantifyChange(candidate)>this.parameter.getEpsilon()) {
					this.approximatedThenCalculated++;
					PNRepResult replayResult = this.replayTraceOnLog(traceAsLog, logAttributes, replayer);
					T conformanceResult = this.retrieveConformanceInformation(trace, replayResult);
					//System.out.println("Approximation->Calculation: "+conformanceResult.toString());
					double distance = this.updateConformance(new TraceAnalysisResult<T>(trace, false, conformanceResult, replayResult));
					return distance>this.parameter.getEpsilon();
					//this.updateConformanceTEST(new TraceAnalysisResult<T>(trace, false, conformanceResult, replayResult));
					//return true;
				}
			}
			this.approximatedVariants++;
			//System.out.println("Approximation: "+potentialResults.get(0));
			this.updateConformanceTEST(new TraceAnalysisResult<T>(trace, true, potentialResults.get(0), referenceTraceInformation.getLeft().getReplayResult()));
			return false;
		}
		else {
			PNRepResult replayResult = this.replayTraceOnLog(traceAsLog, logAttributes, replayer);
			T conformanceResult = this.retrieveConformanceInformation(trace, replayResult);
			//System.out.println("Calculation: "+conformanceResult.toString());
			double distance = this.updateConformance(new TraceAnalysisResult<T>(trace, false, conformanceResult, replayResult));
			return distance>this.parameter.getEpsilon();
		}
	}
/**
	 * template algorithm for approximation-based incremental conformance checking
	 * @param trace
	 * @param net
	 * @param logAttributes
	 * @return
	 */
template algorithm for approximation-based incremental conformance checking
@param trace
@param net
@param logAttributes
@return
template algorithm for approximation - based incremental conformance checking @param trace @param net @param logAttributes @return
protected boolean approximateConformance(XTrace trace, PetrinetGraph net, XAttributeMap logAttributes, Replayer replayer) {
		XLog traceAsLog=new XLogImpl(logAttributes);
		traceAsLog.add(trace);
		Pair<TraceAnalysisResult<T>, TraceEditDistance> referenceTraceInformation = mostSimilarTrace(trace);
		if(kSimilar(trace, referenceTraceInformation)) {
			List<T> potentialResults = determineConformanceApproximations(trace, referenceTraceInformation, logAttributes);
			for (T candidate : potentialResults) {
				if (this.conformanceCalculator.quantifyChange(candidate)>this.parameter.getEpsilon()) {
					this.approximatedThenCalculated++;
					PNRepResult replayResult = this.replayTraceOnLog(traceAsLog, logAttributes, replayer);
					T conformanceResult = this.retrieveConformanceInformation(trace, replayResult);
					double distance = this.updateConformance(new TraceAnalysisResult<T>(trace, false, conformanceResult, replayResult));
					return distance>this.parameter.getEpsilon();
				}
			}
			this.approximatedVariants++;
			this.updateConformanceTEST(new TraceAnalysisResult<T>(trace, true, potentialResults.get(0), referenceTraceInformation.getLeft().getReplayResult()));
			return false;
		}
		else {
			PNRepResult replayResult = this.replayTraceOnLog(traceAsLog, logAttributes, replayer);
			T conformanceResult = this.retrieveConformanceInformation(trace, replayResult);
			double distance = this.updateConformance(new TraceAnalysisResult<T>(trace, false, conformanceResult, replayResult));
			return distance>this.parameter.getEpsilon();
		}
	}
protected boolean approximateConformance ( XTrace trace , PetrinetGraph net , XAttributeMap logAttributes , Replayer replayer ) { XLog traceAsLog = new XLogImpl ( logAttributes ) ; traceAsLog . add ( trace ) ; Pair < TraceAnalysisResult < T > , TraceEditDistance > referenceTraceInformation = mostSimilarTrace ( trace ) ; if ( kSimilar ( trace , referenceTraceInformation ) ) { List < T > potentialResults = determineConformanceApproximations ( trace , referenceTraceInformation , logAttributes ) ; for ( T candidate : potentialResults ) { if ( this . conformanceCalculator . quantifyChange ( candidate ) > this . parameter . getEpsilon ( ) ) { this . approximatedThenCalculated ++ ; PNRepResult replayResult = this . replayTraceOnLog ( traceAsLog , logAttributes , replayer ) ; T conformanceResult = this . retrieveConformanceInformation ( trace , replayResult ) ; double distance = this . updateConformance ( new TraceAnalysisResult < T > ( trace , false , conformanceResult , replayResult ) ) ; return distance > this . parameter . getEpsilon ( ) ; } } this . approximatedVariants ++ ; this . updateConformanceTEST ( new TraceAnalysisResult < T > ( trace , true , potentialResults . get ( 0 ) , referenceTraceInformation . getLeft ( ) . getReplayResult ( ) ) ) ; return false ; } else { PNRepResult replayResult = this . replayTraceOnLog ( traceAsLog , logAttributes , replayer ) ; T conformanceResult = this . retrieveConformanceInformation ( trace , replayResult ) ; double distance = this . updateConformance ( new TraceAnalysisResult < T > ( trace , false , conformanceResult , replayResult ) ) ; return distance > this . parameter . getEpsilon ( ) ; } }
template algorithm for approximation-based incremental conformance checking
 @param trace
 @param net
 @param logAttributes
 @return
template algorithm for approximation - based incremental conformance checking @param trace @param net @param logAttributes @return
//System.out.println("Approximation->Calculation: "+conformanceResult.toString()); //this.updateConformanceTEST(new TraceAnalysisResult<T>(trace, false, conformanceResult, replayResult)); //return true; //System.out.println("Approximation: "+potentialResults.get(0)); //System.out.println("Calculation: "+conformanceResult.toString());