当前位置: 首页>>代码示例>>Java>>正文


Java XEvent类代码示例

本文整理汇总了Java中org.deckfour.xes.model.XEvent的典型用法代码示例。如果您正苦于以下问题:Java XEvent类的具体用法?Java XEvent怎么用?Java XEvent使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


XEvent类属于org.deckfour.xes.model包,在下文中一共展示了XEvent类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getStringOfXEvents

import org.deckfour.xes.model.XEvent; //导入依赖的package包/类
public static <T extends XEvent> StringBuilder getStringOfXEvents(HashMap<String, T> events){

		Iterator<Entry<String, T>> evit = events.entrySet().iterator();
		StringBuilder info = new StringBuilder("");
		
		while(evit.hasNext()){
			Entry<String, T> xee = (Entry<String, T>) evit.next();
			XEvent xe = xee.getValue();
			
			info.append(LEConstants.LOGGER_LINE+"\n");
			info.append("XEvent URI: \t"+xee.getKey()+"\n");

			//handling event's attributes
			XAttributeMap xattmap = xe.getAttributes();
			info.append(getStringOfXAttributeMap("\t", xattmap));
			//END OF handling event's attributes
		}
		
		return 	info;
	}
 
开发者ID:onprom,项目名称:onprom,代码行数:21,代码来源:Print.java

示例2: codeLog

import org.deckfour.xes.model.XEvent; //导入依赖的package包/类
private List<IntArrayList> codeLog(XLog log) {
    List<IntArrayList> codedLog = new ArrayList<>(log.size());
    for(XTrace trace : log) {
        IntArrayList list = new IntArrayList(trace.size());
        for(XEvent event : trace) {
            String name = xEventClassifier.getClassIdentity(event);
            Integer value;
            if((value = stringToIntMap.get(name)) > 0) {
                list.add(value);
            }else {
                stringToIntMap.put(name, events);
                intToStringMap.put(events, name);
                list.add(events);
                events++;
            }
        }
        codedLog.add(list);
    }
    return codedLog;
}
 
开发者ID:raffaeleconforti,项目名称:ResearchCode,代码行数:21,代码来源:LabelFilter.java

示例3: getPermutationTechnique

import org.deckfour.xes.model.XEvent; //导入依赖的package包/类
public static PermutationTechnique getPermutationTechnique(int approach, Set<XEvent> events, EventDistributionCalculator eventDistributionCalculator, XEvent start, XEvent end, boolean debug_mode) {
    if(approach == PermutationTechnique.HEURISTICS_SET) {
        return new HeuristicSetSolutions(events, eventDistributionCalculator, start, end);
    }else if(approach == PermutationTechnique.HEURISTICS_BEST) {
        return new HeuristicBestSolution(events, eventDistributionCalculator, start, end);
    }else if(approach == PermutationTechnique.ILP_GUROBI) {
        return new ILPApproach(events, eventDistributionCalculator, start, end, new Gurobi_Solver(), debug_mode);
    }else if(approach == PermutationTechnique.ILP_LPSOLVE) {
        return new ILPApproach(events, eventDistributionCalculator, start, end, new LPSolve_Solver(), debug_mode);
    }else if(approach == PermutationTechnique.ILP_GUROBI_ARCS) {
        return new ILPApproach(events, eventDistributionCalculator, start, end, new Gurobi_Solver(), debug_mode);
    }else if(approach == PermutationTechnique.ILP_LPSOLVE_ARCS) {
        return new ILPApproach(events, eventDistributionCalculator, start, end, new LPSolve_Solver(), debug_mode);
    }
    return null;
}
 
开发者ID:raffaeleconforti,项目名称:ResearchCode,代码行数:17,代码来源:PermutationTechniqueFactory.java

示例4: findEnd

import org.deckfour.xes.model.XEvent; //导入依赖的package包/类
private XEvent findEnd(XTrace trace, XEvent start, Set<XEvent> events) {
        boolean foundStart = false;
//        for(int i = 0; i < trace.size(); i++) {
//            if(!foundStart && start == trace.get(i)) {
//                foundStart = true;
//                continue;
//            }
//            if(foundStart && !events.contains(trace.get(i))) return trace.get(i);
//        }
        for(XEvent event : trace) {
            if(!foundStart && start == event) {
                foundStart = true;
                continue;
            }
            if(foundStart && !events.contains(event)) return event;
        }
        return null;
    }
 
开发者ID:raffaeleconforti,项目名称:ResearchCode,代码行数:19,代码来源:EventPermutatorSmart.java

示例5: build

import org.deckfour.xes.model.XEvent; //导入依赖的package包/类
private void build(XEvent event1, XEvent event2, boolean smart) {
    OutlierIdentifier outlierIdentifier = outlierIdentifierGenerator.generate(getEventName(event1));
    Outlier<String> outlier = new Outlier<String>(getEventName(event2), outlierIdentifier, true);
    map.addOutlier(outlier);

    if(smart) {
        if(existingDependencies.get(getEventName(event1)) != null) {
            if(existingDependencies.get(getEventName(event1)).contains(getEventName(event2))) {
                map.increaseFrequency(outlier);
                map.increaseIdentifierFrequency(outlierIdentifier);
            }else {
                map.setFrequency(outlier, 0.0);
            }
        }else {
            System.out.println("ERROR");
        }
    }else {
        map.increaseFrequency(outlier);
        map.increaseIdentifierFrequency(outlierIdentifier);
    }
}
 
开发者ID:raffaeleconforti,项目名称:ResearchCode,代码行数:22,代码来源:OutlierMapBuilderNextAndPrevious.java

示例6: HeuristicSetSolutions

import org.deckfour.xes.model.XEvent; //导入依赖的package包/类
public HeuristicSetSolutions(Set<XEvent> events, EventDistributionCalculator eventDistributionCalculator, XEvent start, XEvent end) {
    this.eventDistributionCalculator = eventDistributionCalculator;
    this.eventsArray = events.toArray(new XEvent[events.size() + 2]);
    Arrays.sort(eventsArray, new Comparator<XEvent>() {
        XEventClassifier xEventClassifier = new XEventAndClassifier(new XEventNameClassifier(), new XEventLifeTransClassifier());
        @Override
        public int compare(XEvent o1, XEvent o2) {
            if(o1 != null && o2 != null) return xEventClassifier.getClassIdentity(o1).compareTo(xEventClassifier.getClassIdentity(o2));
            else if(o1 == null) return 1;
            else return -1;
        }
    });
    this.eventsArray[eventsArray.length - 2] = start;
    this.eventsArray[eventsArray.length - 1] = end;
    this.likeloods = new double[events.size() + 2][events.size() + 2];
    computeLikelihoods();
}
 
开发者ID:raffaeleconforti,项目名称:ResearchCode,代码行数:18,代码来源:HeuristicSetSolutions.java

示例7: ILPApproach

import org.deckfour.xes.model.XEvent; //导入依赖的package包/类
public ILPApproach(Set<XEvent> events, EventDistributionCalculator eventDistributionCalculator, XEvent start, XEvent end, ILPSolver solver, boolean debug_mode) {
    this.debug_mode = debug_mode;
    this.solver = solver;
    this.eventDistributionCalculator = eventDistributionCalculator;
    this.eventsArray = events.toArray(new XEvent[events.size() + 2]);
    Arrays.sort(eventsArray, new Comparator<XEvent>() {
        XEventClassifier xEventClassifier = new XEventAndClassifier(new XEventNameClassifier(), new XEventLifeTransClassifier());
        @Override
        public int compare(XEvent o1, XEvent o2) {
            if(o1 != null && o2 != null) return xEventClassifier.getClassIdentity(o1).compareTo(xEventClassifier.getClassIdentity(o2));
            else if(o1 == null) return 1;
            else return -1;
        }
    });
    this.eventsArray[eventsArray.length - 2] = start;
    this.eventsArray[eventsArray.length - 1] = end;
    this.likeloods = new double[events.size() + 2][events.size() + 2];
    computeLikelihoods();
}
 
开发者ID:raffaeleconforti,项目名称:ResearchCode,代码行数:20,代码来源:ILPApproach.java

示例8: computeLikelihoods

import org.deckfour.xes.model.XEvent; //导入依赖的package包/类
private void computeLikelihoods() {
        List<XEvent> list = new ArrayList<>(2);
        for(int i = 0; i < eventsArray.length; i++) {
            for(int j = 0; j < eventsArray.length; j++) {
                if(i != j) {
                    list.clear();
                    list.add(0, eventsArray[i]);
                    list.add(1, eventsArray[j]);
                    likeloods[i][j] = eventDistributionCalculator.computeLikelihood(list);
                    if(i == eventsArray.length - 1 && j == eventsArray.length - 2) {
                        likeloods[i][j] = 1.0;
                    }
                    if(likeloods[i][j] > 0.0) {
                        numberOfArcs++;
//                        likeloods[i][j] *= 10.0;
                    }
                    numberOfArcswithZero++;
                }else {
                    likeloods[i][j] = 0.0;
                }
            }
        }
    }
 
开发者ID:raffaeleconforti,项目名称:ResearchCode,代码行数:24,代码来源:ILPApproach.java

示例9: computeEnrichedLikelihoods

import org.deckfour.xes.model.XEvent; //导入依赖的package包/类
private void computeEnrichedLikelihoods() {
        numberOfArcs = 0;
        numberOfArcswithZero = 0;
        List<XEvent> list = new ArrayList<>(2);
        for(int i = 0; i < eventsArray.length; i++) {
            for(int j = 0; j < eventsArray.length; j++) {
                if(i != j) {
                    list.clear();
                    list.add(0, eventsArray[i]);
                    list.add(1, eventsArray[j]);
                    likeloods[i][j] = eventDistributionCalculator.computeEnrichedLikelihood(list);
                    if(i == eventsArray.length - 1 && j == eventsArray.length - 2) {
                        likeloods[i][j] = 1.0;
                    }
                    if(likeloods[i][j] > 0.0) {
                        numberOfArcs++;
//                        likeloods[i][j] *= 10.0;
                    }
                    numberOfArcswithZero++;
                }else {
                    likeloods[i][j] = 0.0;
                }
            }
        }
    }
 
开发者ID:raffaeleconforti,项目名称:ResearchCode,代码行数:26,代码来源:ILPApproach.java

示例10: removeOutlierSelect

import org.deckfour.xes.model.XEvent; //导入依赖的package包/类
private void removeOutlierSelect(XTrace t, XTrace newT, int i) {
    XEvent before = t.get(i - 1);
    XEvent guilty = t.get(i);
    XEvent after = t.get(i + 1);

    String nameBefore = getEventName(before);
    String nameGuilty = getEventName(guilty);
    String nameAfter = getEventName(after);

    OutlierIdentifier outlierIdentifier = outlierIdentifierGenerator.generate(nameBefore, nameAfter);
    Set<Outlier<String>> set = mapOutliers.getOutliers(outlierIdentifier);
    Outlier<String> outlier = new Outlier<String>(nameGuilty, outlierIdentifier, false);

    if (set == null || !set.contains(outlier)) {
        newT.add((XEvent) t.get(i).clone());
    }
}
 
开发者ID:raffaeleconforti,项目名称:ResearchCode,代码行数:18,代码来源:OutlierRemoverBridge.java

示例11: doesProcessInstanceAlwaysEnd

import org.deckfour.xes.model.XEvent; //导入依赖的package包/类
private boolean doesProcessInstanceAlwaysEnd(Entity grandParent, Set<String> eventNames, UnifiedMap<Entity, XLog> logs) {
    XLog log = logs.get(grandParent);

    boolean correct = false;
    for (XTrace trace : log) {
        boolean occurs = false;
        for (XEvent event : trace) {
            if (eventNames.contains(xce.extractName(event))) {
                occurs = true;
                correct = true;
                break;
            }
        }
        if (occurs && !eventNames.contains(xce.extractName(trace.get(trace.size() - 1)))) {
            correct = false;
            break;
        }
    }
    return correct;
}
 
开发者ID:raffaeleconforti,项目名称:ResearchCode,代码行数:21,代码来源:SubProcessTypeDiscoverer.java

示例12: checkIfOutlier

import org.deckfour.xes.model.XEvent; //导入依赖的package包/类
private void checkIfOutlier(Map<Outlier<String>, Integer> removed, XTrace t, int i, int lookAHead, boolean directOrReverse) {
    XEvent current = directOrReverse?t.get((i - lookAHead)):t.get((i + lookAHead));
    XEvent next = t.get(i);
    String nameCurrent = getEventName(current);
    String nameNext = getEventName(next);

    OutlierIdentifier outlierIdentifier = outlierIdentifierGenerator.generate(nameCurrent);
    Set<Outlier<String>> set = mapOutliers.getOutliers(outlierIdentifier);
    Outlier<String> outlier = new Outlier<String>(nameNext, outlierIdentifier, false);

    if (set != null && set.contains(outlier)) {
        Integer val;
        if ((val = removed.get(outlier)) == null) {
            val = 0;
        }
        val++;
        removed.put(outlier, val);
    }
}
 
开发者ID:raffaeleconforti,项目名称:ResearchCode,代码行数:20,代码来源:OutlierRemoverNextAndPrevious.java

示例13: isXEventFromLastActivity

import org.deckfour.xes.model.XEvent; //导入依赖的package包/类
private boolean isXEventFromLastActivity(BPMNDiagram process, XEvent event) {

        boolean found = false;
        for (Event e : process.getEvents()) {
            if (e.getEventType().equals(Event.EventType.END)) {
                for (Activity activity : getPreviousActivities(process, e, null)) {
                    if (bpmnAnalizer.extractActivityLabel(activity).equals(xce.extractName(event))) {
                        found = true;
                        break;
                    }
                }
                if (found) break;
            }
        }

        return found;
    }
 
开发者ID:raffaeleconforti,项目名称:ResearchCode,代码行数:18,代码来源:SubProcessTypeDiscoverer.java

示例14: removeRedundantPathToEnd

import org.deckfour.xes.model.XEvent; //导入依赖的package包/类
private BPMNDiagram removeRedundantPathToEnd(BPMNDiagram subProcess, XLog log, Set<String> bpmnDiagrams) {
    Set<String> possibleActivitiesToCheck = new UnifiedSet<String>();

    for (XTrace trace : log) {
        XEvent last = null;
        for (XEvent event : trace) {
            if (last != null) {
                String name = xce.extractName(event);
                if (bpmnDiagrams.contains(name)) {
                    possibleActivitiesToCheck.add(xce.extractName(last));
                    break;
                }
            }
            last = event;
        }
    }

    return removePath(subProcess, possibleActivitiesToCheck);
}
 
开发者ID:raffaeleconforti,项目名称:ResearchCode,代码行数:20,代码来源:BPMNSubProcessMiner.java

示例15: removeRedundantPathToEndAfterActivities

import org.deckfour.xes.model.XEvent; //导入依赖的package包/类
private BPMNDiagram removeRedundantPathToEndAfterActivities(BPMNDiagram subProcess, XLog log, Set<String> bpmnDiagrams) {
    Set<String> possibleActivitiesToCheck = new UnifiedSet<String>();

    for (XTrace trace : log) {
        XEvent last = null;
        for (XEvent event : trace) {
            if (last != null) {
                String name = xce.extractName(event);
                if (bpmnDiagrams.contains(name)) {
                    possibleActivitiesToCheck.add(xce.extractName(event));
                    break;
                }
            }
            last = event;
        }
    }

    return removePath(subProcess, possibleActivitiesToCheck);

}
 
开发者ID:raffaeleconforti,项目名称:ResearchCode,代码行数:21,代码来源:BPMNSubProcessMiner.java


注:本文中的org.deckfour.xes.model.XEvent类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。